-
-
Notifications
You must be signed in to change notification settings - Fork 835
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
Rewrite Button to Typescript #2984
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the warning message requires a very slight re-wording so that it isn't confusing, otherwise it looks good to me.
The warning will be logged every time the button redraws... I think it'd be good to only do it once per element, but that'd probably be outside the scope of this PR. |
I couldn't think of a better way to handle that, to be honest, without risking the checks not working correctly. Things like |
It's defined in Component.oncreate(), I believe. Warning in |
71f42f0
to
b5cd804
Compare
Fires `console.warn`, but only when the forum is in debug mode. Can help to inform extension developers of possible issues with their JS code.
- Prefer `aria-label` over `title` - Don't duplicate button content to `title` attribute - Warn in debug mode if button has no accessible content - Use modern JS/TS syntax (`||=`, spread, etc)
Co-authored-by: Matt Kilgore <[email protected]>
b5cd804
to
7f6f4b8
Compare
Progresses #3533, #3364
Changes proposed in this pull request
Button:
aria-label
overtitle
title
attributetitle
attributes by screen readers.||=
, spread, etc)Others:
console.warn
, but only when the forum is in debug mode. Can help to inform extension developers of possible issues with their JS code.aria-label
Reviewers should focus on
Is anything else affected by the preferring of
aria-label
as opposed totitle
? Most likely components that deeply interact with Button and those which extend it.Confirmed
composer test
).Required changes