From 32bd370c6b45fdeb4187781879c2e4119bf13209 Mon Sep 17 00:00:00 2001 From: Paul Bauriegel Date: Tue, 29 Oct 2024 10:30:34 +0100 Subject: [PATCH] Feature - Improve Accessibility for Screenreaders (#5634) # Improve Accessibility for Screenreaders - Description & some structure via Aria-Attributes We are currently in the internal review in Deutsche Telekom how to enable people with disabilities for our annotation process. One key-part will be better usability with screen-readers. This PR tries to enable basic functionality via aria attributes. I tried to not touch the current HTML structure too much, but it might make sense to change some of the aria-role="button" to actual html button. This would be the first of a couple of PR that we are proposing. In future PR we would also want to add a MR for a high contrast mode, and some optimizations for keyboard navigation for blind people. Scope of this one: Description & some structure via Aria-Attributes. - For a lot of icons in buttons: I added aria-hidden="true" as there are not relevant for the screenreader - The buttons and many other UI elements got a screenreader description via aria-label - For some items I added a aria-role such as role="button" or role="table" - There are some additional aria attributes such as: - aria-expanded for collapse panel & drop-down menues - or aria-multiselectable for multi-select labels Next steps - one at a time: - Aria Labels are not multi-lingual yet. - It does not fix the tabindex order or general problems with keyboard navigation for blind people. - high contrast mode fixes - Skip links for Screenreaders - Alt Text for Image Field We will most likely receive more feedback in our internal review process that we will also try to integrate then. **Type of change** - New feature (non-breaking change which adds functionality) **How Has This Been Tested** Local Frontend Build w. Firefox tested w. VoiceOver **Checklist** - I added relevant documentation - I followed the style guidelines of this project - I did a self-review of my code - I made corresponding changes to the documentation - I confirm My changes generate no new warnings - I have added tests that prove my fix is effective or that my feature works - I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/) --------- Co-authored-by: Paul Bauriegel Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Leire --- .../base/base-badge/BaseIconWithBadge.vue | 1 + .../base/base-breadcrumbs/BaseBreadcrumbs.vue | 2 +- .../BaseCollapsablePanel.vue | 15 ++++++++--- .../base/base-dropdown/BaseDropdown.vue | 2 ++ .../components/base/base-icon/BaseIcon.vue | 1 + .../base/base-progress/BaseLinearProgress.vue | 4 ++- .../base-resizable/HorizontalResizable.vue | 2 +- .../base/base-resizable/VerticalResizable.vue | 2 +- .../base/base-search-bar/BaseSearchBar.vue | 4 ++- .../base/base-table/BaseTableInfo.vue | 27 +++++++++++++------ .../base/base-table/TableFiltrableColumn.vue | 3 ++- .../base-topbar-brand/BaseTopbarBrand.vue | 4 +-- .../RecordFeedbackTaskAndQuestionnaire.vue | 2 ++ .../container/fields/RecordMenu.vue | 6 +++-- .../container/fields/RecordStatus.vue | 3 ++- .../SpanAnnotationTextField.vue | 9 ++++--- .../components/EntityComponent.vue | 2 +- .../container/mode/BulkAnnotation.vue | 3 ++- .../container/mode/FocusAnnotation.vue | 2 +- .../container/questions/QuestionsForm.vue | 1 + .../questions/form/Questions.component.vue | 6 +++-- .../DndSelection.component.vue | 4 ++- .../rating/RatingMonoSelection.component.vue | 4 ++- .../LabelSelection.component.vue | 6 +++++ .../QuestionHeader.component.vue | 4 ++- .../search-label/SearchLabel.component.vue | 4 ++- .../questions/form/span/EntityLabelBadge.vue | 2 +- .../span/EntityLabelSelection.component.vue | 4 +++ .../questions/form/span/SpanComponent.vue | 4 +-- .../form/text-area/TextAreaContents.vue | 1 + .../view-config/RecordsViewConfig.vue | 3 ++- .../header/RadioButtonsSelect.base.vue | 2 +- .../annotation/header/StatusFilter.vue | 2 ++ .../header/ToggleAnnotationType.vue | 6 +++-- .../header/filters/FilterButton.vue | 3 ++- .../header/header-bar/HeaderFeedbackTask.vue | 2 +- .../header/metadata-filter/MetadataFilter.vue | 2 +- .../responses-filter/ResponsesFilter.vue | 2 +- .../search-bar-filter/SearchBarFilter.vue | 7 ++--- .../header/sort-filter/SortSelectorItem.vue | 1 + .../suggestion-filter/SuggestionFilter.vue | 2 +- .../annotation/pagination/Pagination.vue | 10 +++++-- .../pagination/PaginationFeedbackTask.vue | 4 +-- .../annotation/progress/TeamProgress.vue | 6 ++++- .../components/features/global/AppHeader.vue | 2 ++ .../global/user/UserAvatarTooltip.vue | 4 +-- .../directives/required-field.directive.js | 1 + 47 files changed, 136 insertions(+), 57 deletions(-) diff --git a/argilla-frontend/components/base/base-badge/BaseIconWithBadge.vue b/argilla-frontend/components/base/base-badge/BaseIconWithBadge.vue index bdda84b146..dda5024534 100644 --- a/argilla-frontend/components/base/base-badge/BaseIconWithBadge.vue +++ b/argilla-frontend/components/base/base-badge/BaseIconWithBadge.vue @@ -20,6 +20,7 @@ :width="badgeSize" :height="badgeSize" :color="iconColor" + :aria-label="icon + ' icon'" /> diff --git a/argilla-frontend/components/base/base-breadcrumbs/BaseBreadcrumbs.vue b/argilla-frontend/components/base/base-breadcrumbs/BaseBreadcrumbs.vue index 62d9872c85..fa70a8a243 100644 --- a/argilla-frontend/components/base/base-breadcrumbs/BaseBreadcrumbs.vue +++ b/argilla-frontend/components/base/base-breadcrumbs/BaseBreadcrumbs.vue @@ -17,7 +17,7 @@ diff --git a/argilla-frontend/components/base/base-progress/BaseLinearProgress.vue b/argilla-frontend/components/base/base-progress/BaseLinearProgress.vue index af224ddcbb..ed9eb83abc 100644 --- a/argilla-frontend/components/base/base-progress/BaseLinearProgress.vue +++ b/argilla-frontend/components/base/base-progress/BaseLinearProgress.vue @@ -6,6 +6,8 @@ v-for="(range, index) in filteredProgressRanges" :key="range.name" role="progressbar" + :aria-valuenow="getPercentage(range.value)" + :aria-label="range.name" :class="[ 'progress__range', showTooltip ? 'progress__range--with-tooltip' : null, @@ -17,7 +19,7 @@ @mouseenter="hoveredRange = range" @mouseleave="hoveredRange = null" > -
+