Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable3] Add type=button attribute to buttons #2071

Merged
merged 1 commit into from
Jun 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/ActionButton/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,9 @@ export default {
<li class="action" :class="{ 'action--disabled': disabled }">
<button
class="action-button"
:aria-label="ariaLabel"
:class="{ focusable: isFocusable }"
:aria-label="ariaLabel"
type="button"
@click="onClick">
<span :class="[isIconUrl ? 'action-button__icon--url' : icon]"
:style="{ backgroundImage: isIconUrl ? `url(${icon})` : null }"
Expand Down
5 changes: 3 additions & 2 deletions src/components/Actions/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,12 @@ export default {
'action-item__menutoggle--with-title': menuTitle,
'action-item__menutoggle--primary': primary
}"
:aria-label="ariaLabel"
aria-haspopup="true"
:aria-label="ariaLabel"
:aria-controls="randomId"
test-attr="1"
:aria-expanded="opened ? 'true' : 'false'"
test-attr="1"
type="button"
@focus="onFocus"
@blur="onBlur">
<slot name="icon" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<button
class="icon-collapse"
:class="{'icon-collapse--rotated':open}"
type="button"
@click="onClick" />
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/components/AppNavigationNew/AppNavigationNew.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<div class="app-navigation-new">
<button :id="buttonId"
:class="buttonClass"
type="button"
:disabled="disabled"
type="button"
@click="$emit('click')">
{{ text }}
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
v-click-outside="clickOutsideConfig"
:class="{ open }">
<div id="app-settings-header">
<button class="settings-button"
<button
class="settings-button"
type="button"
@click="toggleMenu">
{{ title }}
</button>
Expand Down
4 changes: 4 additions & 0 deletions src/components/ColorPicker/ColorPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export default {
:style="{'background-color': color }"
class="color-picker-simple-color-circle"
:class="{ 'color-picker-simple-color-circle--active' : color === currentColor }"
type="button"
@click="pickColor(color)" />
</div>
<Chrome
Expand All @@ -133,14 +134,17 @@ export default {
<button
v-if="advanced"
class="color-picker-navigation-button back"
type="button"
@click="handleBack" />
<button
v-if="!advanced"
class="color-picker-navigation-button more-settings"
type="button"
@click="handleMoreSettings" />
<button
v-if="advanced"
class="color-picker-navigation-button confirm"
type="button"
@click="handleConfirm">
{{ t('Choose') }}
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/Modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export default {
v-tooltip.auto="playPauseTitle"
:class="{ 'play-pause--paused': slideshowPaused }"
class="play-pause"
type="button"
@click="togglePlayPause">
<!-- Progress circle, css animated -->
<div :class="[playing ? 'icon-pause' : 'icon-play']">
Expand Down
1 change: 1 addition & 0 deletions src/components/PopoverMenu/PopoverMenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
class="menuitem focusable"
:class="{active: item.active}"
:disabled="item.disabled"
type="button"
@click.stop.prevent="item.action">
<span :class="item.icon" />
<p v-if="item.text && item.longtext">
Expand Down