-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
WP components audit: ExternalLink & Link #16542
Comments
Props auditAs an addendum, here is a deeper evaluation of the props for these components. This is an effort to expand the components to be more useful and to answer the question, "Are properties well thought out and consistently applied?" This only covers visual props. Event handler props will be evaluated at a later date. Link✨ New
Event handler props will be evaluated at a later date. |
👍 👍 Also, any chance we can add to the docs a summary of the WCAG's recommendations on external links? In summary, it's recommended to avoid external links because some users can get confused with the new windows or tabs, so they should be used with caution. |
Worth noting 'external' doesn't necessarily mean a link must open in a new browser's tab (by using I think the two cases should be distinguished by the means of two separate props:
That's really wrong. All those use cases must use This is also part of an ongoing effort in WordPress core in the last few years, meant to eliminate links that are "not links". See https://core.trac.wordpress.org/query?keywords=~semantic-buttons. In short, the following usages, often tied to some kind of JavaScript interaction, are very bad practices and must be avoided:
I'm not sure I understand what that means. Current Core best practices that need to be implemented:
|
I'm closing out the Component Audit issues for now. |
Is your feature request related to a problem? Please describe.
This issue is part of a review on the naming, structure, and composition of the UI components as brought up in #16367
Link vs Button
Please see this comment on how the link vs button discussion relates to this component library audit: #7534 (comment)
ExternalLink
Audit
Opportunities I came across while reviewing this component.
Grouping
Suggestions
Link (new)
This component doesn't exist but I believe there is a strong need for one, and it is relevant to the naming and structure of existing Button and ExternalLink elements.
Links are standard in several component libraries. Here is a summary of what they can be used for:
Feedback
The feedback I'm looking for is related to naming, structure, and composition. I'm not looking for visual feedback of the components.Prop audit can be seen in the comment below.
The text was updated successfully, but these errors were encountered: