Accessibility: fix aria-hidden without value #12656
Labels
bug
Fixes for quality problems that affect the customer experience
Project:Accessibility
Team:Platform-Design
Team Label for Kibana Design Team. Support the Analyze group of plugins.
Summary: Don't use
aria-hidden
without a value, usearia-hidden="true"
Currently there are some uses of
aria-hidden
without a value across the source code, e.g. in global_nav_link.html.I assume that these were meant to hide the appropriate element (i.e.
aria-hidden="true"
).According to specification
aria-hidden
is not a boolean attribute. It can have values oftrue
/false
/undefined
, which according to the type mapping appendix, maps to a keyword and enumerated attribute in HTML. For those you cannot skip the value, when you want the value to betrue
.So this issue is for replacing all the
aria-hidden
s witharia-hidden="true"
.But Tim, aren't you just terribly nitpicking about standards? Unfortunately no. I've seen a11y issues here, that are actually related to validators not correctly seeing that those elements are hidden from the a11y tree. Also, not following the spec might lead us to pure browser arbitrariness whether or not those elements really get hidden from the a11y tree (and at least the Chrome Accessibility Dev Tools also reports it as broken). So I think we should stick to the standard there and only use
aria-hidden="true"
with a value.The text was updated successfully, but these errors were encountered: