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

fix(VDialog): change the role from "document" to "dialog" #14602

Merged
merged 2 commits into from Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VDialog/VDialog.ts
Expand Up @@ -253,8 +253,9 @@ export default baseMixins.extend({
this.$createElement('div', {
class: this.contentClasses,
attrs: {
role: 'document',
role: 'dialog',
tabindex: this.isActive ? 0 : undefined,
'aria-modal': this.hideOverlay ? undefined : 'true',
...this.getScopeIdAttrs(),
},
on: { keydown: this.onKeydown },
Expand Down Expand Up @@ -318,7 +319,6 @@ export default baseMixins.extend({
this.attach === true ||
this.attach === 'attach',
},
attrs: { role: 'dialog' },
}, [
this.genActivator(),
this.genContent(),
Expand Down
@@ -1,7 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`VDialog.ts should only set tabindex if active 1`] = `
<div role="document"
<div role="dialog"
aria-modal="true"
class="v-dialog__content"
style="z-index: 0;"
>
Expand All @@ -13,7 +14,8 @@ exports[`VDialog.ts should only set tabindex if active 1`] = `
`;

exports[`VDialog.ts should only set tabindex if active 2`] = `
<div role="document"
<div role="dialog"
aria-modal="true"
class="v-dialog__content v-dialog__content--active"
style="z-index: 202; z-index: 202;"
tabindex="0"
Expand All @@ -26,71 +28,51 @@ exports[`VDialog.ts should only set tabindex if active 2`] = `
`;

exports[`VDialog.ts should render a disabled component and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render a eager component and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render a fullscreen component and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render a persistent component and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render a scrollable component and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render component and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render component with custom origin and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render component with custom transition and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render component with custom width (max-width) and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;

exports[`VDialog.ts should render component with custom width and match snapshot 1`] = `
<div role="dialog"
class="v-dialog__container"
>
<div class="v-dialog__container">
</div>
`;