Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: typo
  • Loading branch information
DaniAcu authored and eps1lon committed Feb 6, 2023
commit a1fb8c13a80e43c2610bd483b75a7e1160776f11
16 changes: 10 additions & 6 deletions src/queries/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import {
computeAccessibleDescription,
computeAccessibleName,
} from 'dom-accessibility-api'
import {roles as allRoles, roleElements, ARIARoleDefintionKey} from 'aria-query'
import {
roles as allRoles,
roleElements,
ARIARoleDefinitionKey,
} from 'aria-query'
import {
computeAriaSelected,
computeAriaChecked,
Expand Down Expand Up @@ -61,7 +65,7 @@ const queryAllByRole: AllByRole = (
if (selected !== undefined) {
// guard against unknown roles
if (
allRoles.get(role as ARIARoleDefintionKey)?.props['aria-selected'] ===
allRoles.get(role as ARIARoleDefinitionKey)?.props['aria-selected'] ===
undefined
) {
throw new Error(`"aria-selected" is not supported on role "${role}".`)
Expand All @@ -71,7 +75,7 @@ const queryAllByRole: AllByRole = (
if (checked !== undefined) {
// guard against unknown roles
if (
allRoles.get(role as ARIARoleDefintionKey)?.props['aria-checked'] ===
allRoles.get(role as ARIARoleDefinitionKey)?.props['aria-checked'] ===
undefined
) {
throw new Error(`"aria-checked" is not supported on role "${role}".`)
Expand All @@ -81,7 +85,7 @@ const queryAllByRole: AllByRole = (
if (pressed !== undefined) {
// guard against unknown roles
if (
allRoles.get(role as ARIARoleDefintionKey)?.props['aria-pressed'] ===
allRoles.get(role as ARIARoleDefinitionKey)?.props['aria-pressed'] ===
undefined
) {
throw new Error(`"aria-pressed" is not supported on role "${role}".`)
Expand All @@ -94,7 +98,7 @@ const queryAllByRole: AllByRole = (
// All currently released ARIA versions support `aria-current` on all roles.
// Leaving this for symetry and forward compatibility
if (
allRoles.get(role as ARIARoleDefintionKey)?.props['aria-current'] ===
allRoles.get(role as ARIARoleDefinitionKey)?.props['aria-current'] ===
undefined
) {
throw new Error(`"aria-current" is not supported on role "${role}".`)
Expand All @@ -109,7 +113,7 @@ const queryAllByRole: AllByRole = (
if (expanded !== undefined) {
// guard against unknown roles
if (
allRoles.get(role as ARIARoleDefintionKey)?.props['aria-expanded'] ===
allRoles.get(role as ARIARoleDefinitionKey)?.props['aria-expanded'] ===
undefined
) {
throw new Error(`"aria-expanded" is not supported on role "${role}".`)
Expand Down