Fix stylistic and accessibility issues with user roles.
Review Request #14969 — Created March 26, 2026 and submitted
User roles inherited the parent's foreground color, which wasn't always
correct and could lead to color clashes. Now it defaults to using the
standard foreground color. Custom badges are still free to override
this.Accessibility was also a bit less than ideal. It was being conveyed as
just a bunch of text. Now it's organized intolistandlistitem
roles, with a label for the list.The outer element was also a
<div>, which when it should have been a
<span>, since it's meant to be inlined into other elements.Storybook has fixes for customizing the badge content for the story,
and an outdated CSS file has been removed.
Tested this in both Storybook and in Review Board, alongside some
in-progress code for fixing other style issues.
- Change Summary:
-
area-label->aria-label- Fixed the Storybook to use a
<span>and to includerole="listitem".
- Commits:
-
Summary ID ca2552dc9a097d0046b9d6046e169d187b29174c 6f889cea56d68e96b1f68a0ab350edc1b030fd2d - Diff:
-
Revision 2 (+134 -56)