-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
progressbar: improve JAWS readability #1572
Conversation
attrs : { style : 'width:' + (this.ctx.val || 0) + '%' } | ||
attrs : { | ||
style : 'width:' + val, | ||
role : 'progressbar', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
role
and aria-valuenow
attributes should be added to the root node of the block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this we should change style
and aria-valuenow
attributes in different places. It will be strange.
For example:
<div class="progressbar" aria-valuenow="20">
<div class="progressbar__bar" style="width:20%"></div>
</div>
Two DOM-nodes will be changed each second while some process will be going. If this is not so terrible, I can move these attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's not so terrible. Let's do it.
7b0e039
to
adfb300
Compare
@aristov all a11y attributes was moved to the root node |
@@ -1,14 +1,27 @@ | |||
block('progressbar')( | |||
def()(function() { | |||
var val = this.ctx.val || 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to create variable here.
@aristov updated |
.content({ | ||
elem : 'bar', | ||
attrs : { style : 'width:' + val + '%' } | ||
attrs : { | ||
style : 'width:' + val + '%' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Diff for no reason.
@aristov updated |
LGTM, wait for Gemini tests passing and merge. |
progressbar: improve JAWS readability
Closes #1511