Open Malvoz opened 3 years ago
aria-hidden is used in the disabled state:
aria-hidden
https://github.com/CliffCloud/Leaflet.EasyButton/blob/cd53db586a10d5a9c4efed003327cad29f4760bf/src/easy-button.js#L289
https://github.com/CliffCloud/Leaflet.EasyButton/blob/cd53db586a10d5a9c4efed003327cad29f4760bf/src/easy-button.js#L296
which only hides the content from screen readers, but the button remains focusable, and because it is aria-hidden="true" nothing is announced to the user when it is focused.
aria-hidden="true"
I suggest replacing aria-hidden with aria-disabled to convey to screen readers that the button is currently disabled. See related Leaflet issue: https://github.com/Leaflet/Leaflet/issues/7211 / PR: https://github.com/Leaflet/Leaflet/pull/7280/files.
aria-disabled
Other potentially helpful resources:
aria-hidden
is used in the disabled state:https://github.com/CliffCloud/Leaflet.EasyButton/blob/cd53db586a10d5a9c4efed003327cad29f4760bf/src/easy-button.js#L289
https://github.com/CliffCloud/Leaflet.EasyButton/blob/cd53db586a10d5a9c4efed003327cad29f4760bf/src/easy-button.js#L296
which only hides the content from screen readers, but the button remains focusable, and because it is
aria-hidden="true"
nothing is announced to the user when it is focused.I suggest replacing
aria-hidden
witharia-disabled
to convey to screen readers that the button is currently disabled.See related Leaflet issue: https://github.com/Leaflet/Leaflet/issues/7211 / PR: https://github.com/Leaflet/Leaflet/pull/7280/files.
Other potentially helpful resources: