What is the problem?
On authenticating, the error messages for TOTP and recovery codes don't have role=alert. This is recommended to let screen readers know to notify the user.
We do use role=alert for errors authenticating with WebAuthn.
Steps to reproduce problem
- Setup TOTP for an user on https://en.wikipedia.beta.wmcloud.org
- Logout and login again
- After entering your username and password
- Click "Use authenticator app" (if you are not already there)
- Turn on screen reader
- Enter an invalid TOTP value
Expected behaviour: Screen reader reads the errors message.
Observed behaviour: Screen reader does not.
Environment
Platform: MacOS Sequoia Safari using VoiceOver. Debian 12 Firefox using Orca.
Wiki(s): https://en.wikipedia.beta.wmcloud.org OATHAuth – (c702fa8) 10:45, 7 October 2025. WebAuthn – (1957699) 20:10, 3 October 2025.