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
[docs] Fix most lighthouse a11y issues in input demos #15780
Conversation
Details of bundle changes.Comparing: ca382ef...cb394d0
|
}), | ||
label: 'Label', | ||
}, | ||
inputProps: getInputProps(), |
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.
This change seems to break the focused state. Focus the input, blur it. The focus state remains. I haven't dive into why.
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 haven't dive into why.
You shouldn't. I'm proposing the change so I should fix it.
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 can think of two possible paths to fix it: one is in the core (chain event listener callbacks), one is in the demos (only forward the /aria-/ props). I'm wondering if the latter is the best one?
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.
We need to re-evaluate that component (InputBase). There's too much going on there with props filtering i.e. what prop is passed to which component. Some changes might fall under bug or breaking change depending on the viewpoint. Will follow up on this.
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 this case, should we remove the change of the auto complete from this pull request so we can move forward with the others? (I need to look at the other changes).
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.
What's wrong with the current approach? Focus handling should work now as of 4c0e285
b1b0959
to
4c0e285
Compare
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.
Mostly cosmetic...
docs/src/pages/components/autocomplete/IntegrationReactSelect.js
Outdated
Show resolved
Hide resolved
docs/src/pages/components/autocomplete/IntegrationReactSelect.js
Outdated
Show resolved
Hide resolved
docs/src/pages/components/autocomplete/IntegrationAutosuggest.js
Outdated
Show resolved
Hide resolved
docs/src/pages/components/autocomplete/IntegrationAutosuggest.js
Outdated
Show resolved
Hide resolved
docs/src/pages/components/autocomplete/IntegrationReactSelect.tsx
Outdated
Show resolved
Hide resolved
docs/src/pages/components/autocomplete/IntegrationReactSelect.tsx
Outdated
Show resolved
Hide resolved
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.
The react-select and downshift demos don't work.
fullWidth: true, | ||
classes, | ||
label: 'countries', | ||
InputLabelProps: getLabelProps({ strink: true } as any), |
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.
It's not needed, we can remove the strink
prop.
}, | ||
InputLabelProps: { | ||
htmlFor: 'react-select-single', | ||
shrink: true, |
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.
It's not needed.
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.
Either this or we remove the placeholder. Without this the placeholder is hidden.
Could you be more specific? |
@eps1lon What's the nominal use case for these components? Does the default use case work? (tip: selecting a value among multiple) |
Behavior between master and branch should be on par. There are still some issues but the scope of this PR is lighthouse score only. We can expand on this later because it could be a limitation of the 3rd party libraries. |
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.
clearSelection(); | ||
} | ||
}) => { | ||
const { onBlur, onFocus, ...inputProps } = getInputProps({ foo: 1 }); |
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.
foo?
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.
So it's the 4th. The 3rd has the same behavior on master. I'll have a look. |
Co-Authored-By: Matt <github@nospam.33m.co>
Obvious since it was never applied due to a typo
912cf73
to
af45d2c
Compare
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.
@eps1lon Well done!
Should fix all reported problems from lighthouse except color contrast issues. This is likely an issue with the design spec and needs more investigation. With a dark theme no contrast issues are reported for the components/inputs/* demos and we reach a 100 score for a11y. This is only for issues that are testable automatically. I didn't go through the manual tests.
This PR (db4228d in particular) might have some overlap with #15333.