Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat][Button]: Support icon-only attribute #3398

Closed
1 task done
Westbrook opened this issue Jun 29, 2023 · 1 comment · Fixed by #3716
Closed
1 task done

[Feat][Button]: Support icon-only attribute #3398

Westbrook opened this issue Jun 29, 2023 · 1 comment · Fixed by #3716
Assignees
Labels
Component: Button Discovery enhancement New feature or request Post overlay API Review after Overlay V2 Ships

Comments

@Westbrook
Copy link
Contributor

Code of conduct

  • I agree to follow this project's 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

image

Implementation notes or ideas

The spectrum-Button--iconOnly class leveraged in the CSS output should be converted to an icon-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.

@Westbrook Westbrook added enhancement New feature or request triage An issue needing triage labels Jun 29, 2023
@Westbrook Westbrook added the Post overlay API Review after Overlay V2 Ships label Jul 15, 2023
@Westbrook Westbrook mentioned this issue Jul 17, 2023
21 tasks
@najikahalsema najikahalsema removed the triage An issue needing triage label Oct 12, 2023
@najikahalsema
Copy link
Collaborator

The icon-only button should display the label for button in a tooltip, according to the Spectrum specification. There are also style differences and functional differences that need to be explored and addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Button Discovery enhancement New feature or request Post overlay API Review after Overlay V2 Ships
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants