UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

36 lines (30 loc) 1.15 kB
/*! * KoliBri - The accessible HTML-Standard */ import { g as watchString, N as watchNumber, k as a11yHint } from './common-Cx_AGO_M.js'; const validateAccessKey = (component, value) => { watchString(component, '_accessKey', value); }; const validateShortKey = (component, value) => { watchString(component, '_shortKey', value); }; const options = { hooks: { afterPatch: (value) => { if (value !== -1 && value !== 0) { a11yHint(`Don't Use Tabindex Greater than 0: https://adrianroselli.com/2014/11/dont-use-tabindex-greater-than-0.html`); } }, }, }; const validateTabIndex = (component, value) => { watchNumber(component, '_tabIndex', value, options); }; const validateAccessAndShortKey = (accessKey, shortKey) => { if (accessKey && shortKey) { 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 }; //# sourceMappingURL=access-and-short-key-D734WtlX.js.map //# sourceMappingURL=access-and-short-key-D734WtlX.js.map