Unstyled lists with role="list"
attr
#2115
Replies: 2 comments 1 reply
-
I had no idea this problem existed 🤯. Thanks for sharing and coming up with solutions. Maybe another option could be to add guidance. I know it's not a great solution, but we wouldn't have to worry about our changes causing disruption for current users. I was looking at our own internal usage of the bare list, and in the case of the Autocomplete component we're already defining a role other than |
Beta Was this translation helpful? Give feedback.
-
We fixed one of these instances in #2254. Our healthcare header and footer also have instances of this problem, though. |
Beta Was this translation helpful? Give feedback.
-
We use the class
ds-c-list--bare
to create unstyled lists (list elements without a list marker style). This can cause accessibility problems for Safari users.I've tried to address this issue using documentation in our site, but I wonder if we should have a better internal solution?
I like the idea of tying styles to a11y solutions and was thinking a better way to create unstyled lists would be to attach those style rules to the
role="list"
attribute (which is the fix for this bug)?It could look like this:
or...
The benefits for a solution like this:
The drawback is this is probably a very widely used style and pretty hard to change now that it's in the wild.
Beta Was this translation helpful? Give feedback.
All reactions