-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
[Autocomplete] Fix the errors reported by Wave #18283
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
Conversation
Details of bundle changes.Comparing: 3d393bf...42aa823
|
|
|
||
| .token.boolean, | ||
| .token.number { | ||
| color: #b78eff; |
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.
Reach AA contrast level. The problem is more visible since the introduction of code previews.
|
|
||
| return ( | ||
| <Autocomplete | ||
| id="asynchronous-demo" |
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.
Fix id duplication, server-side as reported by https://validator.w3.org/.
| <IconButton | ||
| {...getPopupIndicatorProps()} | ||
| disabled={disabled} | ||
| aria-label={popupOpen ? 'Close popup' : 'Open popup'} |
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.
Fix a Wave error, not all the screen readers handle title.
| }), | ||
| getInputLabelProps: () => ({ | ||
| id: `${id}-label`, | ||
| htmlFor: id, |
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.
In case somebody doesn't use our TextField.
| // (autocomplete and autofill) | ||
| autoComplete: 'disabled', | ||
| ref: inputRef, | ||
| autoCorrect: 'off', |
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.
Invalid HTML attribute and seems legacy for older versions of Safari. I'm eager to try without.
| 'aria-controls': `${id}-popup`, | ||
| // autoComplete: 'off', // Disable browser's suggestion that might overlap with the popup. | ||
| autoComplete: 'disabled', // disable autocomplete and autofill | ||
| 'aria-controls': popupOpen ? `${id}-popup` : null, |
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.
Fix https://validator.w3.org/ error were aria-controls points to a missing element.
| > | ||
| {renderInput({ | ||
| ref: setAnchorEl, | ||
| id, |
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.
Used by TextField to link the helper text, input, and label together. Error reported by Wave and https://validator.w3.org/.
59ddd6b to
42aa823
Compare
Closes #18132
Solve most of the errors reported by Wave and https://validator.w3.org/.