-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 accessibility for issue comments #22612
Changes from 1 commit
470633c
4561586
4d0ee90
54de3fa
08c69d5
391da9d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
</a> | ||
{{end}} | ||
<div class="content comment-container"> | ||
<div class="ui top attached header comment-header df ac sb"> | ||
<div class="ui top attached header comment-header df ac sb" role="heading" aria-level="3"> | ||
<div class="comment-header-left df ac"> | ||
{{if .Issue.OriginalAuthor}} | ||
<span class="text black bold"> | ||
|
@@ -69,7 +69,7 @@ | |
{{end}} | ||
</div> | ||
</div> | ||
<div class="ui attached segment comment-body"> | ||
<div class="ui attached segment comment-body" role="article"> | ||
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}> | ||
{{if .Issue.RenderedContent}} | ||
{{.Issue.RenderedContent|Str2html}} | ||
|
@@ -85,7 +85,7 @@ | |
</div> | ||
{{$reactions := .Issue.Reactions.GroupByType}} | ||
{{if $reactions}} | ||
<div class="ui attached segment reactions"> | ||
<div class="ui attached segment reactions" role="complementary"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably should be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that is not good for this. For landmark roles «it is not as good practice to use non-semantic elements, such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
comment role should be for the whole comment container (line 29) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @fsologureng Gitea is already overusing the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yep, sounds fine. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes @Menelion, that bad design of menus should change. I have a PR repairing the label issue of reactions, but is not ready yet. I think both changes could be complementary. Understood your apprehension about
|
||
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}} | ||
</div> | ||
{{end}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, is that really a heading?
I mean, it doesn't have any title-like attributes, and doesn't behave exactly like a title…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the objective just to use Aria article like accessibility for readers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole container functions like a comment head, but change the container to a H3 it has a deep impact in visual presentation. That's why this proposition does an aria fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, @fsologureng is totally right. That's btw how it's done on Github: the whole
username commented...
thing is wrapped into a heading.The
article
is good but not enough for navigation. Navigation by headings is in the blood of most blind web users, and a page that lacks headings is extremely inconvenient to navigate through. If you have anarticle
with the comment, you have to: go to the article, then arrow up, i.e., back to see the author, then arrow down again past the author to read the comment text now. This is super inconvenient as it requires moving back and forth in the same text. Please note that blind users A) don't use mouse, only keyboard, and B) we navigate in a linear way, we always arrow up and down (we also use the Tab key, but it's out of this scope).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How important it is that designers understand this.