[Feat][Button]: Support icon-only
attribute
#3398
Labels
Component: Button
Discovery
enhancement
New feature or request
Post overlay API
Review after Overlay V2 Ships
Code of conduct
Impacted component(s)
Button
Description of the requested feature
Spectrum CSS recently added support for icon only Buttons, we should add them to SWC.
Mockups or screenshots
Implementation notes or ideas
The
spectrum-Button--iconOnly
class leveraged in the CSS output should be converted to anicon-only
attribute. See documentation for this sort of conversion, here.If present this attribute should visually suppress the
id="label"
element that delivers slotted content so that it can still be made available to screen readers.We'll need to add size, variant, static, and treatment versions of this pattern to the various Storybook entries for Button, and if there was a sensible functional test to include with this addition, that would be great, too.
Follow up work, once v2 of the Overlay API has been shipped, can expand on this pattern to deliver the provided text content in a Tooltip, as outlined in the specification for this pattern.
The text was updated successfully, but these errors were encountered: