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

Button: rename and deprecate describedBy prop #63483

Closed
afercia opened this issue Jul 12, 2024 · 0 comments · Fixed by #63486
Closed

Button: rename and deprecate describedBy prop #63483

afercia opened this issue Jul 12, 2024 · 0 comments · Fixed by #63486
Assignees
Labels
[Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality

Comments

@afercia
Copy link
Contributor

afercia commented Jul 12, 2024

Description

The button describedBy prop name is misleading.

It is inspired by the ARIA property aria-describedby which suggests it would accept an ID reference. Instead, it accepts a string, which is the actual description text.

It actually renders a visually hidden description, correctly associated to the button via aria-describedby. As such, a more appropriate, less confusing, prop name would be description.

To my understanding, other props have already been deprecated and `aliased' to new names so this wouldn't be unprecedented.
Cc @WordPress/gutenberg-components

Step-by-step reproduction instructions

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Jul 12, 2024
@afercia afercia self-assigned this Jul 12, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality
1 participant