mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Make add line comment
buttons focusable (#25894)
Use a real button and add an aria-label. Additionally, show the button whenever it is focused. See https://codeberg.org/forgejo/forgejo/issues/998 for explanation. Our handling of this button is now equal to that of GitHub. Nothing has changed visually.
This commit is contained in:
parent
9672085d94
commit
d473de0c2d
4 changed files with 15 additions and 10 deletions
|
@ -52,9 +52,9 @@
|
|||
{{else}}
|
||||
<td class="chroma lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">{{/*
|
||||
*/}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
|
||||
*/}}<a class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
|
||||
*/}}<button type="button" aria-label="{{$.root.locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
|
||||
*/}}{{svg "octicon-plus"}}{{/*
|
||||
*/}}</a>{{/*
|
||||
*/}}</button>{{/*
|
||||
*/}}{{end}}{{/*
|
||||
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff "locale" $.root.locale}}{{/*
|
||||
*/}}</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue