@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 712 B
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import{i as watchString,k as watchNumber,a as a11yHint}from"./prop.validators-64749272.js";const validateAccessKey=(a,e)=>{watchString(a,"_accessKey",e)},options={hooks:{afterPatch:a=>{-1!==a&&0!==a&&a11yHint("Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html")}}},validateTabIndex=(a,e)=>{watchNumber(a,"_tabIndex",e,options)},validateShortKey=(a,e)=>{watchString(a,"_shortKey",e)},validateAccessAndShortKey=(a,e)=>{if(a&&e)throw new Error("AccessKey and ShortKey are used. Only one is allowed.")};export{validateAccessAndShortKey as a,validateShortKey as b,validateTabIndex as c,validateAccessKey as v};