ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

LibWeb: Compute default ARIA roles context-sensitively where required

Open sideshowbarker opened this issue 11 months ago • 0 comments

This change implements spec-conformant computation of default ARIA roles for elements whose expected default role depends on the element’s context — specifically, either on the element’s ancestry, or on whether the element has an accessible name, or both. This affects the aside, footer, header, and section elements.

Otherwise, without this change, aside, footer, header, and section elements may unexpectedly end up with the wrong default roles.

This gets us passing 100% of the subtests in the roles-contextual.html test at https://wpt.fyi/results/html-aam?product=ladybird.

This change includes an additional commit that adds a window.internals.getComputedLabel(element) function, for use in our imported copies of the WPT tests related to the behavior in this change.

sideshowbarker avatar Dec 05 '24 10:12 sideshowbarker