-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Improve milestone title #22853
Improve milestone title #22853
Conversation
- Don't use `h2`(which is also bad for a11y reasons) for the title, instead use `font-size` and `font-weight` to make the title look better. - Forgejo issue: https://codeberg.org/forgejo/forgejo/issues/348
Removing item headings prevents screen readers from navigating easily. Improving size should not go against semantics. DIV is one of the least meaningful elements in an HTML structure. The H1 should wrap the Labels|Milestones button, as in Releases (which should have an H1 and not an H2). |
If you still want to change to div, could add |
I don't think they can really be defined as headers. Probably role |
That's for the |
This is no different than the issue list. If there's a good a11y solution, it also should be applied to the lists (in another PR). The milestone one is currently standing out at the moment with its |
That's misusing the heading elements(which currently is already happening), they should follow in logical order. MDN confirms this. Best solution is to figure out which |
Misused or not, they are useful right now and they are going to be removed. That's a degradation of the poor accessibility of this page, and for a solution that only improves the appearance. If there is another lack of a11y (with a fix in progress) it doesn't mean that the criteria should bring everything towards that state, that would be levelling down. Fixing the bad HTML structure with aria markup is the last solution to apply for accessibility, the first one (literaly) is to use the HTML elements made for it. |
I also agree that it's not worth to follow the |
Closing. |
Thank you Gusted. Since this PR is closed, there is a new one #22863 , and the new one fixes one more milestone According to the previous comments (#22853 (comment) , #22853 (comment) ), and confirmed with fsologureng , nothing is changed, so the new PR still uses the |
Fine with me, issue is fixed. I don't follow what to know what to follow. |
Replace #22853 since it's closed, and actually there are 2 places need to be fixed. ~~Follow @fsologureng 's suggestion to keep the `<hX>` tags.~~ Update: from fsologureng: this doesn't change anything from a11y's point of view. So I think this PR could be fine to fix the UI looking problems as a quick patch, then defer the a11y problems to new PRs together. Before: the font-size is too large. After: it seems better. ![image](https://user-images.githubusercontent.com/2114189/218266257-fc2d5872-9e96-4c6a-87ea-f27531ac15c0.png) ![image](https://user-images.githubusercontent.com/2114189/218266247-efc09d83-405f-4495-967a-30d9744134ce.png) Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
h2
for the title, instead usefont-size
andfont-weight
to make the title look better.Pulled from:
gitea/web_src/less/shared/issuelist.less
Lines 30 to 32 in affdd40
Before:
After: