Repository navigation
Accessibility: name every button, restore focus, title every screen - #48
Merged
Merged
Conversation
שלושה דברים שמי שעובדת בעכבר לא מרגישה בהם, ומי שעובדת במקלדת או בקורא מסך נתקעת בהם. 1. כפתורי אייקון בלי שם. קורא מסך הקריא "לחצן" בלבד — בכרטיס תלמידה אחת עשרה פעמים ברצף, כולל מחיקת הערה וניתוק הורה. בפרופיל המורה גם עשרת שדות השעה של חלונות הזמינות היו בלי שם, כך שאי אפשר היה לדעת איזה יום ואיזה קצה. התוספת היא ariaLabel שמזהה את השורה: "מחיקת התשלום של דוד כהן מ־08/09/2026". הדפוס כבר קיים במערכת (פעמון ההתראות, מסך ההודעות) — רק לא הופעל כאן. 2. המיקוד אבד אחרי כל סגירת דיאלוג. p-dialog מעביר מיקוד פנימה בפתיחה ואין לו בכלל הגדרה להחזיר אותו בסגירה, כך שאחרי Escape המיקוד חזר ל-body וצריך היה לטאב מראש הדף. הנחיה על הבורר p-dialog זוכרת מה היה ממוקד ומחזירה — רק אם הכפתור עדיין קיים ואם אף אחד לא לקח את המיקוד בינתיים. 3. כותרת הדף הייתה "תלמידון" בכל מסך. באפליקציית עמוד יחיד אין טעינה שתכריז על מעבר מסך, והכותרת היא ההודעה היחידה שאומרת "עברת". נוספה TitleStrategy וכותרת לכל מסלול, זהה לכותרת שעל המסך.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Three things a mouse user never notices, and a keyboard or screen-reader user runs into every single time.
1. Icon-only buttons with no accessible name
I measured the accessible name of every control on the real screens. Before:
A screen reader announced only "button" — eleven times in a row on a student card, four of them note deletions and one an unlink-parent. The
pTooltipsome of them carry does not help: it addsaria-describedbyonly while it is shown, and it is not a name.After:
Each name identifies its row, because in a list of four notes "delete" on its own says nothing. The pattern already exists in the app — the notifications bell, the messages screen, the dark-mode toggle — it just was not applied here.
2. Focus lost after every dialog close
This happened on all 20 dialogs. PrimeNG's
p-dialogmoves focus inside on open (focusOnShow) and has no setting at all to put it back on close — I checked the library source. The result: after Escape you have to tab from the top of the page again.The fix is a directive on the
p-dialogselector, so every dialog in a component that imports it gets the behaviour without touching a template. It is deliberately cautious — it restores only if the trigger still exists in the document (after a delete it does not), and only if nothing else has taken focus meanwhile.After:
3. The document title was "תלמידון" on every screen
In a single-page app there is no page load to announce a screen change, and the title is the only thing that says "you have moved". It is also what shows in the tab, in history and in bookmarks. After:
Each route's title matches the heading shown on the screen, so the tab and the page say the same thing.
Checked and found sound — left alone
<main>and anh1are present on every teacher, parent and student screen.lang="he" dir="rtl"on the document.:focus-visible).Testing
npx ng build— clean.npx vitest run— 30 passing (app.spec.tsfails on main too, unrelated). The directive itself was verified in the browser rather than in a unit test: it acts on real focus and a real DOM, and the test environment here is Node without one.Demo data untouched — 4 teachers, 3 students, 2 parents.