I'm working on a sign up form for a website and I wanted to include a password-strength meter which will be in the form of a progressbar widget.
Most examples I've seen set role=progressbar
on the HTML element but that doesn't sound quite right to me according to the WAI Aria 1.1 recommendation:
An element that displays the progress status for tasks that take a long time.
A progressbar indicates that the user's request has been received and the application is making progress toward completing the requested action. [...]
Reading the above, I'd be enclined to omit the role
attribute altogether as I didn't find any that match a "meter type" in the list of widget roles.
Is it better for users of assistive technology to have role=progressbar
or does it cause confusion? Would it be better to omit it?
Traditionally in GUI applications, a progress bar isn't focusable and even sometimes totally invisible when navigating with a screen reader. It is only announced when its value changes, or periodically every x seconds. Additionally, the progress bar is there to show a percentage of progress, usually a value between 0% and 100%, and it isn't supposed to decrease.
Therefore, in your case of password strength, as you have guessed, a progress bar is probably inappropriate for several reasons:
For all the reasons above, I would rather advise you to don't use the progressbar role, and complement your progress bar with an ARIA live region, saying something like "Password strength: good" which is updated while typing.