Skip to content

Commit

Permalink
[Accessibility] Fix markup for issue comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Menelion committed Jan 26, 2023
1 parent 642db3c commit 470633c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions templates/repo/issue/view_content.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down Expand Up @@ -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}}
Expand All @@ -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">
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
</div>
{{end}}
Expand Down
6 changes: 3 additions & 3 deletions templates/repo/issue/view_content/comments.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 .OriginalAuthor}}
<span class="text black bold mr-2">
Expand Down Expand Up @@ -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 (and $.IsSigned (eq $.SignedUserID .PosterID))}}data-can-edit="true"{{end}}>
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
Expand All @@ -85,7 +85,7 @@
</div>
{{$reactions := .Reactions.GroupByType}}
{{if $reactions}}
<div class="ui attached segment reactions">
<div class="ui attached segment reactions" role="complementary">
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
</div>
{{end}}
Expand Down

0 comments on commit 470633c

Please sign in to comment.