diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-11-12 23:06:14 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-11-12 23:06:26 +0000 |
| commit | 84e2fa1a5e42badbbcd88b4eccc1d11abae231fb (patch) | |
| tree | 3d1752ce84d8a2a808bba2d5d9199235ae9076cb /src/components/extra_buttons/extra_buttons.js | |
| parent | 3781f0e3bf3f796772a42226bc2897eb0b3294b4 (diff) | |
Merge branch 'tusooa/react-more-actions-fix' into 'develop'
Accessibility for react & extra buttons
See merge request pleroma/pleroma-fe!1869
(cherry picked from commit 18c0cf1845a95db2d0e894d2455cdd4dc545aaf7)
0026b35f Add alt text for react and extra-buttons popup
82063f34 Add aria-controls to extra-buttons trigger
5ff14837 Add changelog
Diffstat (limited to 'src/components/extra_buttons/extra_buttons.js')
| -rw-r--r-- | src/components/extra_buttons/extra_buttons.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js index 48b960b2..e2c88ceb 100644 --- a/src/components/extra_buttons/extra_buttons.js +++ b/src/components/extra_buttons/extra_buttons.js @@ -1,4 +1,5 @@ import Popover from '../popover/popover.vue' +import genRandomSeed from '../../services/random_seed/random_seed.service.js' import ConfirmModal from '../confirm_modal/confirm_modal.vue' import { library } from '@fortawesome/fontawesome-svg-core' import { @@ -40,7 +41,8 @@ const ExtraButtons = { data () { return { expanded: false, - showingDeleteDialog: false + showingDeleteDialog: false, + randomSeed: genRandomSeed() } }, methods: { @@ -152,6 +154,15 @@ const ExtraButtons = { editingAvailable () { return this.$store.state.instance.editingAvailable }, shouldConfirmDelete () { return this.$store.getters.mergedConfig.modalOnDelete + }, + triggerAttrs () { + return { + title: this.$t('status.more_actions'), + id: `popup-trigger-${this.randomSeed}`, + 'aria-controls': `popup-menu-${this.randomSeed}`, + 'aria-expanded': this.expanded, + 'aria-haspopup': 'menu' + } } } } |
