You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our prototype currently behaves differently to a native field when it comes to what is focused after selecting a file.
It makes sense to focus on something visible.
The native element has the focus around the button and the file name:
There is no visible focus in the prototype version:
We need to decide where the focus should go. The options are:
the button
an area around the button and the file name (similar to the native element)
somewhere else?
Why
We should make our implementation as consistent with the native behaviour as possible.
Unless we think we can improve the behaviour (in a way that isn't unexpected).
Who needs to work on this
Accessibility specialist, designer
Who needs to review this
We'll review the decision as a team in a decision log meeting
Done when
Options with their pros and cons documented
Researched what other implementations do
Decision made and logged
The text was updated successfully, but these errors were encountered:
selfthinker
changed the title
Review whether focus is needed when file is uploaded [Anika to create issue]
Decide where visible focus should go after selecting a file
Jan 8, 2025
I'd recommend to put the programmatic and visual focus back onto the button after a file has been selected.
Putting the focus back onto the element that triggered the focus to be moved away is general best practice.
This would go against trying to make our new component behave as much as possible like the native element. But focusing on an area around the button and the feedback area (like a native element does) would make this more complex and potentially confusing.
We had discussed this in a meeting yesterday. We mostly agreed, although putting the focus onto an area around the button and feedback area was also discussed.
Another thing I only realised after our discussion is that with the native element the focus before selecting a file is on the same as the focus after selecting a file. So, by keeping it on the button in our new implementation, we're following the same pattern. Although, if we wanted to move the focus to the whole area and also follow that same pattern, we should do that when simply tabbing to it as well. But I don't think that makes sense (for the same reasons mentioned above).
I'll close this now as the decision has been made.
But we need to be flexible enough to change this decision if it turns out there is a reason which we don't foresee yet.
What
Our prototype currently behaves differently to a native field when it comes to what is focused after selecting a file.
It makes sense to focus on something visible.
The native element has the focus around the button and the file name:
There is no visible focus in the prototype version:
We need to decide where the focus should go. The options are:
Why
We should make our implementation as consistent with the native behaviour as possible.
Unless we think we can improve the behaviour (in a way that isn't unexpected).
Who needs to work on this
Accessibility specialist, designer
Who needs to review this
We'll review the decision as a team in a decision log meeting
Done when
The text was updated successfully, but these errors were encountered: