You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally, the element could be changed from a <label> to a <button> since there is no <input> element to associate the label's @for attribute, this attribute can then be removed, and an @aria-label attribute can be added to give it an accessible name. With this method, the JavaScript will likely need to be updated to associate the click event with this new element and not the <label>—keyboard support will be provided by the browser.
With these updates it should provide keyboard focus and screen reader access with the correct names and roles: https://share.zight.com/xQukj6mo - NOTE: the interactivity has not been added to the button in the video, so while the button can be identified and focused the keyboard support is not available until the javascript has been updated.
Alternatively, attributes can be added to the <label>: a @role attribute to identify it as a button, an @aria-label to give it an accessible name, and a @tabindex to put it in the page's focus order. In this case, keyboard support will need to be added so the "Clear All" event is fired when the Enter key or Spacebar is pressed when it has focus.
In either case use aria-hidden="true" on the SVG image and interior text to ensure unnecessary information is not announced or repeated.
The "Clear all" button here is a bit different than the "Import" button. The Import uses the <label> and <input> elements but the <input> element is not part of the "Clear all" so the fixes will be a little different. There is a separate issue for the "Import" button, #5388.
This is an issue identified by Accessibility issues for screenreader users #5187
The text was updated successfully, but these errors were encountered:
derekjackson-das
changed the title
The Clear All button in the Presets panel is not keyboard-accessible.
Presets Panel: Clear All button is not keyboard-accessible.
Jan 27, 2025
Issue Description
The "Clear all" button is not keyboard accessible and does not have an interactive element associated with it. Related to issue #5388
WCAG Criteria
2.1.1 Keyboard - A
Screenshot or Screen Recording
Relevant Code
Notes
Ideally, the element could be changed from a
<label>
to a<button>
since there is no<input>
element to associate the label's@for
attribute, this attribute can then be removed, and an@aria-label
attribute can be added to give it an accessible name. With this method, the JavaScript will likely need to be updated to associate the click event with this new element and not the<label>
—keyboard support will be provided by the browser.With these updates it should provide keyboard focus and screen reader access with the correct names and roles:
https://share.zight.com/xQukj6mo - NOTE: the interactivity has not been added to the button in the video, so while the button can be identified and focused the keyboard support is not available until the javascript has been updated.
Alternatively, attributes can be added to the
<label>
: a@role
attribute to identify it as a button, an@aria-label
to give it an accessible name, and a@tabindex
to put it in the page's focus order. In this case, keyboard support will need to be added so the "Clear All" event is fired when the Enter key or Spacebar is pressed when it has focus.In either case use
aria-hidden="true"
on the SVG image and interior text to ensure unnecessary information is not announced or repeated.The "Clear all" button here is a bit different than the "Import" button. The Import uses the
<label>
and<input>
elements but the<input>
element is not part of the "Clear all" so the fixes will be a little different. There is a separate issue for the "Import" button, #5388.This is an issue identified by Accessibility issues for screenreader users #5187
The text was updated successfully, but these errors were encountered: