@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
18 lines (17 loc) • 705 B
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { watchJsonArrayString } from "../utils";
import { a11yHint } from "../utils/a11y.tipps";
export const validateSuggestions = (component, value) => {
watchJsonArrayString(component, '_suggestions', (item) => typeof item === 'string' || typeof item === 'number', value, undefined, {
hooks: {
afterPatch: (value) => {
if (Array.isArray(value) && value.length) {
a11yHint('Property suggestions: Options have accessibility issues in how browsers implemented them and should not be used for now.');
}
},
},
});
};
//# sourceMappingURL=suggestions.js.map