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

fix(a11y): correct label "for" references to fields #1904

Merged
merged 1 commit into from
Nov 26, 2018
Merged

fix(a11y): correct label "for" references to fields #1904

merged 1 commit into from
Nov 26, 2018

Conversation

alexandernanberg
Copy link
Contributor

Summary

Partly fixes one of the issues described (labels) in #1333.

Previously a new forID was generated on every render which caused some issues. Now we store a generated id on the class instance instead that never updates (unless the component re-mounts). Also had to make some adjustments in the toggle component to allow it to be controlled from a label.

There is still some work to get all the widgets to work properly, like the markdown, file etc. But I think that can be resolved in another PR.

Test plan

Manually tested everything

@verythorough
Copy link
Contributor

Deploy preview for netlify-cms-www ready!

Built with commit abddc52

https://deploy-preview-1904--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

Deploy preview for cms-demo ready!

Built with commit abddc52

https://deploy-preview-1904--cms-demo.netlify.com

Copy link
Contributor

@erquhart erquhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for this 👍

@erquhart erquhart merged commit 955f94f into decaporg:master Nov 26, 2018
@alexandernanberg alexandernanberg deleted the fix/field-label-ids branch November 26, 2018 17:17
LoicMahieu added a commit to LoicMahieu/netlify-cms that referenced this pull request Nov 29, 2018
* official/master: (42 commits)
  chore: improve publish scripts
  Publish
  chore: test before publishing
  chore(netlify-cms-core): upgrade react-dnd to 7.x (decaporg#1922)
  chore(netlify-cms-widget-text): upgrade to react-textarea-autosize 7.x (decaporg#1921)
  chore(netlify-cms-core): upgrade to react-waypoint 8.x (decaporg#1920)
  fix(backend): use singular label in custom commit message (decaporg#1917)
  docs: add GAE-specific oAuth client (decaporg#1918)
  fix(netlify-cms-widget-text): set correct font family (decaporg#1916)
  chore(netlify-cms-core): upgrade redux and related dependencies (decaporg#1914)
  chore(dependencies): bump npm-run-all (decaporg#1913)
  fix(netlify-cms-core): fix identifier field validation (decaporg#1907)
  docs: improve widget custom validation sample (decaporg#1911)
  improvement(backends): changes for registerBackend compatibility (decaporg#1880)
  fix(netlify-cms-core): fix prop-types warnings (decaporg#1906)
  fix(a11y): correct label "for" references to fields (decaporg#1904)
  improvement(netlify-cms-core): wrap navigations in lists for better a11y (decaporg#1903)
  fix(netlify-cms-widget-markdown): add missing border radius on toolbar (decaporg#1905)
  fix(netlify-cms-core): remove double focusable elements on profile menu button (decaporg#1900)
  fix(config): remove identifier field validation (decaporg#1882)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants