[4.x]: Autofocused title field causes undesirable consequences #12324
-
What happened?I have a problem that frequently occurs on desktop browsers across multiple Craft instances in both versions 3 and 4. Basically, as/when the page loads there is sometimes accidental user input from the keyboard. Due to the HTML Autofocus is quite a subjective feature; not everyone will appreciate it and it's unaccommodating for user error. Additionally, I find it a little presumptuous to assume the user will want to enter text into the title field on any given entry. In my experience, it's the field that is least likely to be edited once initially set. How helpful is it to focus on an element that we don't know the user wants to edit? My individual use case here could perhaps be regarded as an accessibility issue. Although the autofocus attribute doesn't violate any accessibility rules, it has been discussed as something to use with caution in regard to accessibility. Here are a few articles on the topic:
I would like to see an option for disabling autofocus on title fields when editing or even just removing it entirely (note: I'm talking about editing, it is of course genuinely useful when Creating a new entry). But for editing, I don't think it's useful to assume the user wants to edit the title field and there are other methods the CMS could use to help the user tab-navigate to the content of the page quickly if desired, such as a skip link component for example. I hope this is helpful. I've filed this as a bug because it's causing me issues, but I understand if you'd like to move to a discussion topic. Craft CMS version3 and 4 PHP versionNo response Operating system and versionNo response Database type and versionNo response Image driver and versionNo response Installed plugins and versions |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
We dropped |
Beta Was this translation helpful? Give feedback.
We dropped
autofocus
throughout the control panel in Craft 4.4.