Accessibility inspector not showing correct aria role

The aria roles for an element are different in the DOM and Accessibility inspectors.

See the role in the Accessibility inspector, it says “section”:

See the role in the DOM inspector, it says “search”:

Why are the roles different?

Hi, I realize that this is unexpected but search is one of those roles (landmark roles) that are exposed in Firefox via “xml-roles” attribute rather than a role property (you can see that in the inspector too, if you expand the attributes property you’ll see that xml-roles is set to search).

Screen readers should be able to handle this case and as far as I can tell you are doing it right, if you landmark roles show up as xml-roles attribute in Firefox.

I see it under xml-roles. Thanks for responding!