Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
xref: https://github.com/github/accessibility-audits/issues/4441
Description
This PR updates the rename branch dialog to place the warnings about a remote branch existing and/or a stash existing to be before the input. It was discussed and determined that these warnings do not have to do with the branch name input itself, but what the result of renaming a branch will do. Therefore, we do not associate this warnings with input. Additionally, we are following the “let the user explore to find results or errors” strategy as "it preserves user expectations about how focus is managed in dialogs, and it suits this particular message’s context and severity." (See comment on accessibility issue). Since the input not has content before it, we can no longer focus it on mount and instead move to the default of the close button so that a screen reader user may have the opportunity to find it by browsing the dialog before the input.
Other notes:
aria-describedby
to the dialog or the submit button. But, decided that they didn't make sense for the content.Screenshots
macOS VoiceOver
CleanShot.2023-08-02.at.11.10.46.mp4
Windows NVDA
CleanShot.2023-08-02.at.11.33.14.mp4
Release notes
Notes: [Improved] The rename dialog warnings are placed before the branch name input.