mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(react): address Doctor findings (#1143)
Accessibility/semantics pass aligned with React Doctor: role-based spans/divs become real buttons, role=status becomes <output>, modals use native <dialog>, author/peer flags render as <img>, and embed/challenge iframes are sandboxed. Includes review follow-ups: correct button chrome/centering/themed dialog colors and focus rings, the missing aria-label i18n keys (all languages), the Yandex image-search URL, clearer .bso setup steps, a keyboard-accessible image-search dropdown, and removal of the post-edit ('comment edited') display (mod edits unchanged).
This commit is contained in:
@@ -90,7 +90,7 @@ describe('BoardPagination', () => {
|
||||
expect(container.textContent).toContain('catalog');
|
||||
expect(container.textContent).toContain('archive');
|
||||
|
||||
const allLink = Array.from(container.querySelectorAll<HTMLElement>('[role="button"]')).find((element) => element.textContent === 'all');
|
||||
const allLink = Array.from(container.querySelectorAll<HTMLButtonElement>('button')).find((element) => element.textContent === 'all');
|
||||
expect(allLink).toBeTruthy();
|
||||
|
||||
await act(async () => {
|
||||
|
||||
@@ -45,9 +45,9 @@ const BoardPagination = ({ basePath, currentPage, search = '', totalPages, foote
|
||||
{currentPage === 1 && (
|
||||
<span className={styles.footerPageItem}>
|
||||
<span className={styles.footerPageBracket}>[</span>
|
||||
<span
|
||||
<button
|
||||
type='button'
|
||||
className={styles.footerPageLink}
|
||||
role='button'
|
||||
tabIndex={0}
|
||||
onClick={() => setEnableInfiniteScroll(true)}
|
||||
onKeyDown={(e) => {
|
||||
@@ -58,7 +58,7 @@ const BoardPagination = ({ basePath, currentPage, search = '', totalPages, foote
|
||||
}}
|
||||
>
|
||||
{t('all')}
|
||||
</span>
|
||||
</button>
|
||||
<span className={styles.footerPageBracket}>]</span>
|
||||
</span>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user