w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
181 stars 48 forks source link

Redundant conditions in Document Conformance table #239

Closed AlexLloyd0 closed 4 years ago

AlexLloyd0 commented 4 years ago

The document conformance table states that a

li element whose parent is an ol, ul or menu

has a role=listitem.

However li must be in a ol, ul or menu (HTML Standard) so the condition on parenthood just excludes things like <ul><div><li>, but it's not clear to me why that li shouldn't have role=listitem.

Should that cell of the table just be replaced with li?

AlexLloyd0 commented 4 years ago

Similarly for td:

role=cell if a descendant of a table element.

but I don't think a td without a table ancestor is valid HTML

scottaohara commented 4 years ago

Yeh, that can be simplified to just say li.

Webkit/Chromium do still expose a listitem role if a li isn't within a list container. Firefox doesn't. It just treats it as a text node, which, imo is more accurate there's no parent listing... but

Regarding td though, if a child of a table role=grid that cell will become a role=gridcell. so that can stay / will have more clarity once #196 is merged after another review.