How do I improve the accessibility of the draggable windows in OrbitOS? #34
-
How do I improve the accessibility of the draggable windows in OrbitOS? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To enhance window accessibility: |
Beta Was this translation helpful? Give feedback.
To enhance window accessibility:
1. Open
src/components/Window.js
.2. Add ARIA attributes and keyboard support:
javascript<br>const Window = ({ title }) => {<br> return (<br> <div role="dialog" aria-label={title} tabIndex={0} onKeyDown={(e) => { if (e.key === 'Enter') toggleMaximize(); }}><br> {/* Window content */}<br> </div><br> );<br>};<br>
3. Ensure focus management with
useRef
for keyboard navigation.4. Test with a screen reader (e.g., NVDA).
5. Update tests in
tests/
and submit a pull request.