Skip to content

Usage of appropriate html tags instead of divs #31656

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
wnhrt opened this issue Jul 18, 2024 · 5 comments
Closed

Usage of appropriate html tags instead of divs #31656

wnhrt opened this issue Jul 18, 2024 · 5 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea topic/ui Change the appearance of the Gitea UI

Comments

@wnhrt
Copy link

wnhrt commented Jul 18, 2024

Description

Some "buttons" currently use the <div> tag. This can cause accessability issues.

I found this in following places (also see screenshots below):

  • In the top navigation bar, "Profile and Settings" and "Create"
  • On the profile page, "Filter" and "Sort"

In my case the browser extension vimium is not able to access the menu points, which appear after clicking those elements.

Screenshots

image

Top navigation bar

image

Also on the blue marked subpages

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

Yes

Operating System

No response

Browser Version

Firefox 128.0

@wnhrt wnhrt added topic/ui Change the appearance of the Gitea UI type/bug labels Jul 18, 2024
@wxiaoguang
Copy link
Contributor

The "Filter" element is already aria-friendly (including the "Profile and Settings" and "Create"):

<div class="item ui small dropdown jump" role="combobox" aria-haspopup="listbox" aria-controls="_aria_auto_id_12" aria-expanded="false" tabindex="0">

It is not a button, and it already declares itself as a "combobox", so any aria-aware software should be able to recognize it correctly, so I think it's vimium's responsibility to handle aria-related elements.

@wxiaoguang wxiaoguang added issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Jul 18, 2024
@wnhrt wnhrt changed the title Use html button tag instat of div Usage of appropriate html tags instead of divs Jul 18, 2024
@wnhrt
Copy link
Author

wnhrt commented Jul 18, 2024

I appreciate the extensive usage of aria attributes/roles and will ask on vimiums site if they plan on using them.

Is there a reason why <button>, <select> or similar are not used here, since ARIA recommends usage of native elements?

In comparison, GitHub seems to implement the same feature using native elements (<button>, <ul> and <li>) and also aria attributes/roles. However they use role="none" for menu items where Gitea uses the fitting menuitem role, which appears like an oversight.
image

Also I found some overlaping issues which mention accessability (#21742) and rework of the UI (#29849). With a rework in planning, I see no reason to fix this issue now, but keep the concerns in mind.

The title is updated to better reflect my intention.

@wxiaoguang
Copy link
Contributor

Is there a reason why <button>, <select> or similar are not used here,

Because Gitea is still using Fomantic UI : https://fomantic-ui.com/modules/dropdown.html#/usage

@techknowlogick
Copy link
Member

There is also effort being made to switch away from fomantic: https://blog.gitea.com/goodbye-jquery/

@GiteaBot
Copy link
Collaborator

GiteaBot commented Sep 9, 2024

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@GiteaBot GiteaBot closed this as completed Sep 9, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail issue/not-a-bug The reported issue is the intended behavior or the problem is not inside Gitea topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

No branches or pull requests

5 participants
@techknowlogick @wxiaoguang @GiteaBot @wnhrt and others