Skip to content
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

Aria role wrong with ariaAuto #557

Open
skarkkai opened this issue Jun 14, 2017 · 0 comments
Open

Aria role wrong with ariaAuto #557

skarkkai opened this issue Jun 14, 2017 · 0 comments

Comments

@skarkkai
Copy link

What version of ng-dialog are you using?

1.3.0

What version of AngularJS are you using?

1.6.4

What browsers are affected?

At least latest Chrome and Firefox on Linux.

Please describe the issue

Aria role attribute is always set to alertdialog when ariaAuto is true (and no ariaRole parameter passed), even though the dialog has many input fields.

According to my testing, this appears to be because inputs' offsetWidth and offsetHeight are 0 at the time getFocusableElements() is called from applyAriaAttributes(). When getFocusableElements() is called later from elsewhere, offsetWidth and offsetHeight are non-zero.

I assume this is because during the first call, the browser hasn't yet rendered the elements, and so they don't have positioning-related attributes. The problem disappears if I change the call

privateMethods.applyAriaAttributes($dialog, options);

to

setTimeout(function(){
    privateMethods.applyAriaAttributes($dialog, options);
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant