feat(accessibility): add ARIA semantics and landmark roles#594
Open
baich110 wants to merge 15 commits into
Open
feat(accessibility): add ARIA semantics and landmark roles#594baich110 wants to merge 15 commits into
baich110 wants to merge 15 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements comprehensive accessibility (a11y) improvements for the OpenList frontend, based on a file-by-file source code audit. The changes address critical barriers that prevent TalkBack (Android screen reader) users from using the app's core features.
Related issues: #2800 (Chinese) / #2801 (English)
Problem
OpenList's Android app renders its UI through a WebView. While the Web interface works functionally, interactive elements lacked ARIA semantic annotations, making the app nearly unusable for visually impaired users who rely on screen readers. A full-project audit found only ~25
aria-labelinstances, concentrated in image preview controls, with zero coverage in core interaction areas (file list, context menu, toolbar).Changes
P0 - Critical (File List & Context Menu)
src/pages/home/folder/ListItem.tsxrole="listitem"+aria-labelto list item container (merges filename, size, type, and modified date into one announceable unit)tabIndex={0}for keyboard focusaria-labelto selection checkboxsrc/pages/home/folder/GridItem.tsxrole="listitem"+aria-labelto grid item containertabIndex={0}for keyboard focusaltattribute to thumbnail imagesaria-labelto selection checkboxsrc/pages/home/folder/context-menu.tsxaria-labelto menu containeraria-labelto all menu items (rename, move, copy, delete, share, decompress)P1 - High (Semantic Structure & Toolbar)
src/pages/home/folder/List.tsxrole="list"to list containerrole="button",tabIndex={0},aria-labelto sort column headersaria-labelto select-all checkboxsrc/pages/home/Layout.tsx<Box as="main" role="main">for landmark navigationsrc/pages/home/header/Header.tsxrole="banner"to headersrc/pages/home/Nav.tsxrole="navigation"+aria-labelto breadcrumb navigationsrc/pages/home/toolbar/Icon.tsxaria-label+tabIndex={0}toCenterIcon(rename, move, copy, delete, decompress, share, cancel select, download)aria-label+tabIndex={0}toRightIcon(refresh, new file, mkdir, upload, offline download, settings, etc.)src/pages/home/toolbar/BackTop.tsxaria-label+tabIndex={0}to back-to-top buttonP2 - Medium (Dynamic Content & UI Controls)
src/utils/notify.tsxrole="status"+aria-live="polite"to notification container (Toast notifications now announced by screen readers)src/components/FullLoading.tsxrole="status"+aria-busy="true"+aria-labelto loading spinnerssrc/components/SwitchColorMode.tsxaria-label+tabIndex={0}to color mode togglesrc/pages/home/Password.tsxaria-labelto password inputP3 - Low (HTML Structure)
index.htmlsrc/app/App.tsxaria-hidden="true"to routing progress bar (decorative)Impact
aria-labelinstances, core interaction areas completely blankTesting
Unable to build locally in this environment. The changes are purely additive ARIA attributes and semantic HTML -- no logic changes. Recommend testing with:
Background
We are from the Chinese visually impaired community (20,000+ visually impaired developers, 200,000+ users). We conducted a full source code audit of both the backend and frontend, with all issues documented in #2800/#2801. This PR implements the fixes for the documented issues.