Skip to content

Commit 470633c

Browse files
committed
[Accessibility] Fix markup for issue comments
1 parent 642db3c commit 470633c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

templates/repo/issue/view_content.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</a>
2828
{{end}}
2929
<div class="content comment-container">
30-
<div class="ui top attached header comment-header df ac sb">
30+
<div class="ui top attached header comment-header df ac sb" role="heading" aria-level="3">
3131
<div class="comment-header-left df ac">
3232
{{if .Issue.OriginalAuthor}}
3333
<span class="text black bold">
@@ -69,7 +69,7 @@
6969
{{end}}
7070
</div>
7171
</div>
72-
<div class="ui attached segment comment-body">
72+
<div class="ui attached segment comment-body" role="article">
7373
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
7474
{{if .Issue.RenderedContent}}
7575
{{.Issue.RenderedContent|Str2html}}
@@ -85,7 +85,7 @@
8585
</div>
8686
{{$reactions := .Issue.Reactions.GroupByType}}
8787
{{if $reactions}}
88-
<div class="ui attached segment reactions">
88+
<div class="ui attached segment reactions" role="complementary">
8989
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
9090
</div>
9191
{{end}}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</a>
2323
{{end}}
2424
<div class="content comment-container">
25-
<div class="ui top attached header comment-header df ac sb">
25+
<div class="ui top attached header comment-header df ac sb" role="heading" aria-level="3">
2626
<div class="comment-header-left df ac">
2727
{{if .OriginalAuthor}}
2828
<span class="text black bold mr-2">
@@ -69,7 +69,7 @@
6969
{{end}}
7070
</div>
7171
</div>
72-
<div class="ui attached segment comment-body">
72+
<div class="ui attached segment comment-body" role="article">
7373
<div class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
7474
{{if .RenderedContent}}
7575
{{.RenderedContent|Str2html}}
@@ -85,7 +85,7 @@
8585
</div>
8686
{{$reactions := .Reactions.GroupByType}}
8787
{{if $reactions}}
88-
<div class="ui attached segment reactions">
88+
<div class="ui attached segment reactions" role="complementary">
8989
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
9090
</div>
9191
{{end}}

0 commit comments

Comments
 (0)