fix(@headless-react / @headless-vue): update WAI-ARIA reference links (#2230)

* fix(@headlessui/react): WAI-ARIA reference links

* fix(@headlessui-vue): Fix WAI-ARIA reference links

---------

Co-authored-by: lumilno <nooa.lumilaakso@gmail.com>
This commit is contained in:
Adventune
2023-01-31 18:42:02 +02:00
committed by GitHub
parent 63fb14d28f
commit f2d9ea08b6
10 changed files with 17 additions and 17 deletions
@@ -786,7 +786,7 @@ let Input = forwardRefWithAs(function Input<
let handleKeyDown = useEvent((event: ReactKeyboardEvent<HTMLInputElement>) => {
isTyping.current = true
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
case Keys.Backspace:
case Keys.Delete:
@@ -993,7 +993,7 @@ let Button = forwardRefWithAs(function Button<TTag extends ElementType = typeof
let handleKeyDown = useEvent((event: ReactKeyboardEvent<HTMLUListElement>) => {
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
case Keys.ArrowDown:
event.preventDefault()
@@ -1,4 +1,4 @@
// WAI-ARIA: https://www.w3.org/TR/wai-aria-practices-1.2/#dialog_modal
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/
import React, {
createContext,
createRef,
@@ -1,4 +1,4 @@
// WAI-ARIA: https://www.w3.org/TR/wai-aria-practices-1.2/#disclosure
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
import React, {
Fragment,
createContext,
@@ -602,7 +602,7 @@ let Button = forwardRefWithAs(function Button<TTag extends ElementType = typeof
let handleKeyDown = useEvent((event: ReactKeyboardEvent<HTMLButtonElement>) => {
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-13
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/#keyboard-interaction-13
case Keys.Space:
case Keys.Enter:
@@ -775,7 +775,7 @@ let Options = forwardRefWithAs(function Options<
searchDisposables.dispose()
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
// @ts-expect-error Fallthrough is expected here
case Keys.Space:
@@ -1,4 +1,4 @@
// WAI-ARIA: https://www.w3.org/TR/wai-aria-practices-1.2/#menubutton
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/
import React, {
Fragment,
createContext,
@@ -320,7 +320,7 @@ let Button = forwardRefWithAs(function Button<TTag extends ElementType = typeof
let handleKeyDown = useEvent((event: ReactKeyboardEvent<HTMLButtonElement>) => {
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-13
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/#keyboard-interaction-13
case Keys.Space:
case Keys.Enter:
@@ -451,7 +451,7 @@ let Items = forwardRefWithAs(function Items<TTag extends ElementType = typeof DE
searchDisposables.dispose()
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
// @ts-expect-error Fallthrough is expected here
case Keys.Space:
@@ -562,7 +562,7 @@ export let ComboboxButton = defineComponent({
function handleKeydown(event: KeyboardEvent) {
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
case Keys.ArrowDown:
event.preventDefault()
@@ -756,7 +756,7 @@ export let ComboboxInput = defineComponent({
function handleKeyDown(event: KeyboardEvent) {
isTyping.value = true
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
case Keys.Backspace:
case Keys.Delete:
@@ -1,4 +1,4 @@
// WAI-ARIA: https://www.w3.org/TR/wai-aria-practices-1.2/#dialog_modal
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/
import {
computed,
defineComponent,
@@ -1,4 +1,4 @@
// WAI-ARIA: https://www.w3.org/TR/wai-aria-practices-1.2/#disclosure
// WAI-ARIA: https://www.w3.org/WAI/ARIA/apg/patterns/disclosure/
import {
defineComponent,
ref,
@@ -463,7 +463,7 @@ export let ListboxButton = defineComponent({
function handleKeyDown(event: KeyboardEvent) {
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-13
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/#keyboard-interaction-13
case Keys.Space:
case Keys.Enter:
@@ -571,7 +571,7 @@ export let ListboxOptions = defineComponent({
if (searchDebounce.value) clearTimeout(searchDebounce.value)
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
// @ts-expect-error Fallthrough is expected here
case Keys.Space:
@@ -255,7 +255,7 @@ export let MenuButton = defineComponent({
function handleKeyDown(event: KeyboardEvent) {
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-13
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menubutton/#keyboard-interaction-13
case Keys.Space:
case Keys.Enter:
@@ -368,7 +368,7 @@ export let MenuItems = defineComponent({
if (searchDebounce.value) clearTimeout(searchDebounce.value)
switch (event.key) {
// Ref: https://www.w3.org/TR/wai-aria-practices-1.2/#keyboard-interaction-12
// Ref: https://www.w3.org/WAI/ARIA/apg/patterns/menu/#keyboard-interaction-12
// @ts-expect-error Fallthrough is expected here
case Keys.Space: