A11y Bug 4295466: Fix increase/decrease font size buttons not appearing disabled at min/max bounds in Article mode#668
Conversation
|
@copilot The issue was about visually showing the button as disabled. |
Added |
|
@copilot but now the narrator announcement is not proper...when decrease button gets disabled the focus is automatically moving out to increase button but narrator announces "Onenote Web clipper decrease font size", however the focus should remain locked in unless user moves out and if user presses enter it should day disabled. |
Switched from the native
CSS selectors updated from |
|
@copilot Wy are the changes in package-lock.json needed? Please remove if it is additional and not intended with these changes. |
The |
When text size reaches its maximum (72px) or minimum (8px), the corresponding font size button was functionally blocked but never communicated its disabled state visually or to assistive technology, leaving keyboard and screen reader users without feedback.
Changes
src/scripts/renderer.tsupdateFontSizeButtonStates()helper that setsaria-disabled="true/false"onfontDecreaseBtn/fontIncreaseBtnbased on currentarticleFontSizevs. the 8px/72px boundsaria-disabledinstead of the nativedisabledattribute so focus remains on the button (no involuntary focus jump) and screen readers (including Windows Narrator) announce the button as unavailable when navigated to; pressing Enter is silently blocked by the existing bounds guards in the click handlerssrc/styles/renderer.less&[aria-disabled="true"] { opacity: 0.4; cursor: default; }to the#article-header buttonrule so disabled font-size buttons are visually dimmed&:hover:not(.active):not([aria-disabled="true"])to prevent hover highlighting on disabled buttonsOriginal prompt
Work item: AB#4295466
Created via Azure DevOps