Make Kiwix search results accessible for screen readers #778 (#1321)

Signed off by @devhenode
This commit is contained in:
Henry O. 2025-03-23 16:11:33 -07:00 committed by GitHub
parent 6d5d5000bf
commit 1a01365032
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -104,7 +104,7 @@
</nav> </nav>
<form id="formArticleSearch"> <form id="formArticleSearch" role="search" aria-label="Search articles">
<div class="container"> <div class="container">
<div class="row"> <div class="row">
<span class="col-10"> <span class="col-10">
@ -774,8 +774,8 @@
<!-- List of articles matching the typed prefix --> <!-- List of articles matching the typed prefix -->
<div id="articleListWithHeader" style="display: none;" class="container"> <div id="articleListWithHeader" style="display: none;" class="container">
<span id="articleListHeaderMessage"></span> <span id="articleListHeaderMessage" aria-live="polite"></span>
<div id="articleList" class="list-group"> <div id="articleList" class="list-group" role="listbox">
</div> </div>
</div> </div>
<!-- Bootstrap alert box --> <!-- Bootstrap alert box -->

View File

@ -2019,7 +2019,7 @@ function populateListOfArticles (dirEntryArray, reportingSearch) {
// Info: encodeURIComponent encodes all characters except A-Z a-z 0-9 - _ . ! ~ * ' ( ) // Info: encodeURIComponent encodes all characters except A-Z a-z 0-9 - _ . ! ~ * ' ( )
var dirEntryStringId = encodeURIComponent(dirEntry.toStringId()); var dirEntryStringId = encodeURIComponent(dirEntry.toStringId());
articleListDivHtml += '<a href="#" dirEntryId="' + dirEntryStringId + articleListDivHtml += '<a href="#" dirEntryId="' + dirEntryStringId +
'" class="list-group-item">' + dirEntry.getTitleOrUrl() + '</a>'; '" class="list-group-item" role="option">' + dirEntry.getTitleOrUrl() + '</a>';
} }
// innerHTML required for this line // innerHTML required for this line