This demo is currently a work in progress.
Before getting into the technical details of the
autofocus attribute, it is important to discuss how using the attribute can causes usability issues for all users. Whenever we do something automatically for users, it takes away their choice in the matter. This can be good in many instances! Reducing cognitive load is very important in accessibility. This process can look like:
What it looks like less often is automating functionality. It is not possible to fully automate accessibility because every person is different and every disability or condition a person might have is typically on a spectrum and affects the person uniquely. There are some things that can and should be automated, but it is absolutely necessary to figure out if an automation makes something unusable for anyone before implementing it.
Some examples of good automation:
Click this button to open an alert