Skip to content

Use label element on form views #1100

@Flo0807

Description

@Flo0807

To improve a11y we should use the HTML label element for input labels and reference the input with the for attribute.

For this, we have to refactor the Backpex.HTML.Layout.input_label component to require a for attr. Every time we call the component, e.g. in fields, we then need to pass the id of the input (most of the time this would be @form[@name].id) to the input_label component.

For reference: There is a closed PR that already made most of these changes. #731

Metadata

Metadata

Assignees

Labels

good-first-issueIdeal for new contributors. Simple, well-defined tasks to help you get started.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions