mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-12 22:10:25 +00:00
[v15.0/forgejo] Revert "Improve repo file list table semantics for screen readers (#12031)" (#12094)
This reverts commit d76d6f24ce / #12031 to address the problem in #12082.
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12094
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Mathieu Fenniak <mathieu@fenniak.net>
Co-committed-by: Mathieu Fenniak <mathieu@fenniak.net>
This commit is contained in:
parent
3f65795f4d
commit
c8156fbc60
4 changed files with 9 additions and 19 deletions
|
|
@ -52,10 +52,6 @@
|
|||
"relativetime.1week": "last week",
|
||||
"relativetime.1month": "last month",
|
||||
"relativetime.1year": "last year",
|
||||
"repo.files.caption": "Repository files (latest commit first)",
|
||||
"repo.files.filename": "Filename",
|
||||
"repo.files.last_commit_message": "Latest commit message",
|
||||
"repo.files.last_commit_date": "Latest commit date",
|
||||
"repo.issues.filter_poster.hint": "Filter by the author",
|
||||
"repo.issues.filter_assignee.hint": "Filter by assigned user",
|
||||
"repo.issues.filter_reviewers.hint": "Filter by user who reviewed",
|
||||
|
|
|
|||
|
|
@ -1,23 +1,17 @@
|
|||
<table id="repo-files-table" class="ui single line table tw-mt-0" {{if .HasFilesWithoutLatestCommit}}hx-indicator="tr.notready td.message span" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}>
|
||||
<caption class="tw-sr-only">
|
||||
{{ctx.Locale.Tr "repo.files.caption"}}
|
||||
</caption>
|
||||
<thead class="tw-sr-only">
|
||||
<th>{{ctx.Locale.Tr "repo.files.filename"}}</th>
|
||||
<th>{{ctx.Locale.Tr "repo.files.last_commit_message"}}</th>
|
||||
<th>{{ctx.Locale.Tr "repo.files.last_commit_date"}}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<thead>
|
||||
<tr class="commit-list">
|
||||
<td class="tw-overflow-hidden" colspan="2">
|
||||
<th class="tw-overflow-hidden" colspan="2">
|
||||
<div class="tw-flex">
|
||||
<div class="latest-commit">
|
||||
{{template "repo/latest_commit" .}}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{DateUtils.TimeSince .LatestCommit.Committer.When}}{{end}}{{end}}</td>
|
||||
</th>
|
||||
<th class="text grey right age">{{if .LatestCommit}}{{if .LatestCommit.Committer}}{{DateUtils.TimeSince .LatestCommit.Committer.When}}{{end}}{{end}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{if .HasParentPath}}
|
||||
<tr class="has-parent">
|
||||
<td colspan="3"><a class="muted" href="{{.BranchLink}}{{if .ParentPath}}{{PathEscapeSegments .ParentPath}}{{end}}">{{svg "octicon-reply" 16 "tw-mr-2"}}..</a></td>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ func testViewRepo(t *testing.T) {
|
|||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
files := htmlDoc.doc.Find("#repo-files-table > tbody > tr:not(.commit-list)")
|
||||
files := htmlDoc.doc.Find("#repo-files-table > TBODY > TR")
|
||||
|
||||
type file struct {
|
||||
fileName string
|
||||
|
|
@ -1039,7 +1039,7 @@ func TestRepoFilesList(t *testing.T) {
|
|||
resp := MakeRequest(t, req, http.StatusOK)
|
||||
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
filesList := htmlDoc.Find("#repo-files-table tbody tr:not(.commit-list)").Map(func(_ int, s *goquery.Selection) string {
|
||||
filesList := htmlDoc.Find("#repo-files-table tbody tr").Map(func(_ int, s *goquery.Selection) string {
|
||||
return s.AttrOr("data-entryname", "")
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ td .commit-summary {
|
|||
max-width: calc(calc(min(100vw, 1280px)) - 145px - calc(2 * var(--page-margin-x)));
|
||||
}
|
||||
|
||||
.repo-files-table-latest-commit-row td {
|
||||
.repository.file.list #repo-files-table thead th {
|
||||
font-weight: var(--font-weight-normal);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue