Files
klz-cables.com/.pnpm-store/v10/files/ac/5daf612704134eec8985cccdd14c8c64e319c2b46dde630e052ea559f37e2644113ce872124dc693c1f672c739ac0872ca6bf24598c0656c778461ad364c7e
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

62 lines
1.2 KiB
Plaintext

import React, { useState, useCallback } from 'react';
const hiddenStyles = {
display: 'none'
};
function HiddenText(_ref) {
let {
id,
value
} = _ref;
return React.createElement("div", {
id: id,
style: hiddenStyles
}, value);
}
function LiveRegion(_ref) {
let {
id,
announcement,
ariaLiveType = "assertive"
} = _ref;
// Hide element visually but keep it readable by screen readers
const visuallyHidden = {
position: 'fixed',
top: 0,
left: 0,
width: 1,
height: 1,
margin: -1,
border: 0,
padding: 0,
overflow: 'hidden',
clip: 'rect(0 0 0 0)',
clipPath: 'inset(100%)',
whiteSpace: 'nowrap'
};
return React.createElement("div", {
id: id,
style: visuallyHidden,
role: "status",
"aria-live": ariaLiveType,
"aria-atomic": true
}, announcement);
}
function useAnnouncement() {
const [announcement, setAnnouncement] = useState('');
const announce = useCallback(value => {
if (value != null) {
setAnnouncement(value);
}
}, []);
return {
announce,
announcement
};
}
export { HiddenText, LiveRegion, useAnnouncement };
//# sourceMappingURL=accessibility.esm.js.map