Add aria attributes to improve facet accessibility. #2607
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Adds aria attributes to facets to improve accessibility. This includes adding
aria-disabled
andaria-role
attributes to disabled links, as per the solution described in this article. It also includes adding anaria-label
attribute to the links, so that the accessible label makes it clear whether following the link will add or remove the filter.The change also includes a filter for the accessible label:
ep_facet_widget_term_accessible_label
.Closes #2596
Verification Process
aria-label
that reads "Apply filter:", followed by the term name.aria-disabled="true"
attribute and anaria-role="link"
attribute. Active filters should have anaria-label
that reads "Remove filter:", followed by the term name.Checklist:
Changelog Entry
Added ARIA attributes to Facet widget links to improve accessibility.
Credits
Props @JakePT