From 24e47b40e3ff3e701b022fb7b4b224b056a745b4 Mon Sep 17 00:00:00 2001 From: nova <53654944+novari@users.noreply.github.com> Date: Fri, 9 Feb 2024 23:55:02 +0100 Subject: [PATCH] Add DPub Aria Role type definitions --- src/jsx.d.ts | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/src/jsx.d.ts b/src/jsx.d.ts index 85ae0a5f78..c58ac48e69 100644 --- a/src/jsx.d.ts +++ b/src/jsx.d.ts @@ -1996,7 +1996,7 @@ export namespace JSXInternal { } // All the WAI-ARIA 1.2 role attribute values from https://www.w3.org/TR/wai-aria-1.2/#role_definitions - type AriaRole = + type WAIAriaRole = | 'alert' | 'alertdialog' | 'application' @@ -2093,6 +2093,50 @@ export namespace JSXInternal { | 'window' | 'none presentation'; + // All the Digital Publishing WAI-ARIA 1.0 role attribute values from https://www.w3.org/TR/dpub-aria-1.0/#role_definitions + type DPubAriaRole = + | 'doc-abstract' + | 'doc-acknowledgments' + | 'doc-afterword' + | 'doc-appendix' + | 'doc-backlink' + | 'doc-biblioentry' + | 'doc-bibliography' + | 'doc-biblioref' + | 'doc-chapter' + | 'doc-colophon' + | 'doc-conclusion' + | 'doc-cover' + | 'doc-credit' + | 'doc-credits' + | 'doc-dedication' + | 'doc-endnote' + | 'doc-endnotes' + | 'doc-epigraph' + | 'doc-epilogue' + | 'doc-errata' + | 'doc-example' + | 'doc-footnote' + | 'doc-foreword' + | 'doc-glossary' + | 'doc-glossref' + | 'doc-index' + | 'doc-introduction' + | 'doc-noteref' + | 'doc-notice' + | 'doc-pagebreak' + | 'doc-pagelist' + | 'doc-part' + | 'doc-preface' + | 'doc-prologue' + | 'doc-pullquote' + | 'doc-qna' + | 'doc-subtitle' + | 'doc-tip' + | 'doc-toc'; + + type AriaRole = WAIAriaRole | DPubAriaRole; + export interface HTMLAttributes extends ClassAttributes, DOMAttributes,