role=list for lists without list-style
CSS trick.👇
— Stefan Judis (@stefanjudis) January 5, 2021
`list-style` affects semantics in some screen readers. Use `role` to define that a ul/ol really is a list (even if it doesn't have bullet points).
When you now use role, the list-style is removed.🎉
Found in @piccalilli_'s Modern CSS Reset.https://t.co/zprVIjdtbk pic.twitter.com/xwfFkdWQUT
Screenreaders may not see a list (<ol>
or <ul>
) when their list-style
is set to none
. Add role="list"
to re-add that semantic.