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

Classifier: Use explicit labelling for workflow tasks #5737

Open
1 of 6 tasks
eatyourgreens opened this issue Dec 3, 2023 · 1 comment
Open
1 of 6 tasks

Classifier: Use explicit labelling for workflow tasks #5737

eatyourgreens opened this issue Dec 3, 2023 · 1 comment
Labels
accessibility Improving the experience for users of assistive technologies bug Something isn't working

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Dec 3, 2023

Package

Choose from the list:

  • app-content-pages
  • app-project
  • lib-classifier
  • lib-panoptes-js
  • lib-react-components
  • unknown

Describe the bug

When form inputs are labelled in workflow tasks, they tend to use implicit labelling, where the label wraps its associated input. Implicit labels aren't well supported by assistive technology and explicit labels are preferred, where the for attribute is used to link a label to its input.

To Reproduce

Inspect the label for a task input and check whether it uses the for attribute.

Expected behavior

Accessible form inputs should use explicit labels, with for attributes.

@eatyourgreens eatyourgreens added the bug Something isn't working label Dec 3, 2023
@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Dec 3, 2023

Looking at the code for question tasks and drawing tasks, it's not immediately clear whether the label is linked to the input at all.

<input
autoFocus={autoFocus}
checked={checked}
disabled={disabled}
name={name}
onChange={onChange}
type={type}
value={index}
/>
<StyledTaskLabel margin={{ vertical: 'small', horizontal: 'none' }}>
<TaskInputLabel label={label} labelIcon={labelIcon} labelStatus={labelStatus} />
</StyledTaskLabel>
</StyledTaskInput>

EDIT: StyledTaskLabel is a HTML <span>, not a <label>, so the naming isn't quite right there.

@goplayoutside3 goplayoutside3 changed the title Use explicit labelling for workflow tasks Classifier: Use explicit labelling for workflow tasks Jan 20, 2025
@goplayoutside3 goplayoutside3 added the accessibility Improving the experience for users of assistive technologies label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Improving the experience for users of assistive technologies bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants