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

Improve CheckboxRadioSwitch for better accessibility #2708

Closed
JuliaKirschenheuter opened this issue May 24, 2022 · 0 comments · Fixed by #2776
Closed

Improve CheckboxRadioSwitch for better accessibility #2708

JuliaKirschenheuter opened this issue May 24, 2022 · 0 comments · Fixed by #2776
Assignees
Labels
2. developing Work in progress enhancement New feature or request feature: checkbox-radio-switch Related to the checkbox-radio-switch component
Milestone

Comments

@JuliaKirschenheuter
Copy link
Contributor

As i saw implementation within nextcloud/server#32557 i have noticed, that the accessibility for CheckboxRadioSwitch needs to be improved.

  1. Real input should be positioned within the label, on top of the SVG.
    When you hide an interactive element, make sure you choose a hiding technique that keeps it screen reader-accessible, position it on top of whatever is visually replacing it so that a user navigating by touch can find it where they expect to, and then make it transparent.

  2. Styles
    https://github.com/nextcloud/nextcloud-vue/blob/d806d43e6b70364e740d8a00d71df46b547b4a7a/src/components/CheckboxRadioSwitch/CheckboxRadioSwitch.vue#L414-L420

should be replaced with

position: absolute
opacity: 0; 
z-index: -1;
// hide it visually but make sure it is still ‘physically’ present where it would naturally be present so that touch users can find it with haptics.
width: 1em;
height: 1em;

see more here https://www.sarasoueidan.com/blog/inclusively-hiding-and-styling-checkboxes-and-radio-buttons/

@JuliaKirschenheuter JuliaKirschenheuter added 1. to develop Accepted and waiting to be taken care of enhancement New feature or request labels May 24, 2022
@raimund-schluessler raimund-schluessler added 2. developing Work in progress feature: checkbox-radio-switch Related to the checkbox-radio-switch component and removed 1. to develop Accepted and waiting to be taken care of labels Jun 16, 2022
@raimund-schluessler raimund-schluessler added this to the 6.0.0 milestone Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement New feature or request feature: checkbox-radio-switch Related to the checkbox-radio-switch component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants