Great list! It should be noted (unless this has changed since I last read about it) use of the autofocus property is not encouraged because when an element is focused through it, that event is not reported to screen readers.
It would be cool if there was an aria-compatible way of automatically focusing a form field, though! If anyone knows of any (or if my information about autofocus is outdated) I'd love to hear about it!
You are right about the accessibility issue with autofocus. One solution is adding the aria-describedby attribute when using it. Thanks for pointing it out.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great list! It should be noted (unless this has changed since I last read about it) use of the
autofocus
property is not encouraged because when an element is focused through it, that event is not reported to screen readers.It would be cool if there was an aria-compatible way of automatically focusing a form field, though! If anyone knows of any (or if my information about
autofocus
is outdated) I'd love to hear about it!Hi Josh,
Thanks a lot.
You are right about the accessibility issue with autofocus. One solution is adding the
aria-describedby
attribute when using it. Thanks for pointing it out.