Open fredvisser opened 1 month ago
Supports fast-menu-item elements or elements with a role of 'menuitem', 'menuitemcheckbox', and 'menuitemradio'"
Wild didn't realize that was part of the template. We probably want an HLD. At first glance I'd say having separate elements like nimble-checkbox-menu-item
would be more inline with our api as it allows you to:
There could be an argument to use what fast gives but my suspicion is it'll be messier to try and share checkbox / radio styles consistently, but maybe not! HLD / prototype would be nice.
Some more questions from team discussion:
💡 New Component
😯 Problem to Solve
The
nimble-menu-button
is often used to contain check/selectable items, but today we simply insert a check icon into thenimble-menu-item
to style it as selected.In doing so, we neglect the correct ARIA role="menuitemcheckbox" and require our clients to manage this state.
💁 Proposed Solution
The existing FAST component already supports (Supports fast-menu-item elements or elements with a role of 'menuitem', 'menuitemcheckbox', and 'menuitemradio'").
Perhaps we document that
role="menuitemcheckbox"
is valid fornimble-menu-item
, and style the menu-item to automatically add the checkbox icon when the item is checked?