WebKit recognizes: Recognizes role="navigation complementary foo" but not role=" navigation complementary foo" Probably just need to trim/split the string value before analyzing. Also check newline and other non-space whitespace chars.
<rdar://problem/16015977>
Also fails on newlines and tab chars in role value. See: LayoutTests/accessibility/roles-computedRoleString.html FAIL: div[role=foo button bar] -> . Expected: button. FAIL: div[role=foo button bar] -> . Expected: button.
Clarifying: this new layout test is coming in bug 127447. LayoutTests/accessibility/roles-computedRoleString.html
Tagging WPTImpact because this will fail with some of the impending role tests coming with the Interop 2023 Accessibility Investigation.