Skip to content

Accessibility - Tab order is wrong on creating an issue (tabindex) #26731

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TDesjardins opened this issue Aug 25, 2023 · 1 comment · Fixed by #26733
Closed

Accessibility - Tab order is wrong on creating an issue (tabindex) #26731

TDesjardins opened this issue Aug 25, 2023 · 1 comment · Fixed by #26733
Labels
topic/accessibility This issue/pull request wants to improve the accessibility type/bug

Comments

@TDesjardins
Copy link

TDesjardins commented Aug 25, 2023

Description

When navigating with keyboard when creating an issue the tab order isn't plausible. I expect after editing the title the next tab is the description text area or the tabpanel but it jumps to somewhere else and the next targets are the menu items.

Strange settings of tabindex attributes on different DOM elements are the cause. A best practice is to not set the tabindex > 0 and using the natural DOM order.

Gitea Version

1.20.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

run from docker but doesn't matter

Database

None

@techknowlogick techknowlogick added the topic/accessibility This issue/pull request wants to improve the accessibility label Aug 25, 2023
@wxiaoguang
Copy link
Contributor

-> Fix incorrect "tabindex" attributes #26733

wxiaoguang added a commit that referenced this issue Aug 26, 2023
Fix #26731

Almost all "tabindex" in code are incorrect.

1. All "input/button" by default are focusable, so no need to use "tabindex=0"
2. All "div/span" by default are not focusable, so no need to use "tabindex=-1"
3. All "dropdown" are focusable by framework, so no need to use "tabindex"
4. Some tabindex values are incorrect (eg: `new_form.tmpl`), so remove them

Co-authored-by: Giteabot <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/accessibility This issue/pull request wants to improve the accessibility type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants