Royal Icing — Patrick George Wyndham Smith · May 19, 2020
Useful React hooks for accessibility
0Sign in to vote or save
This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
Useful React hooks for accessibility import { useMemo } from 'react' ; import { v4 as uuid } from 'uuid' ; export function useLabelledBy ( ): readonly [ string , { 'aria-labelledby' : string } ] { const uniqueID = useMemo (uuid, [uuid]); return [uniqueID, { 'aria-labelledby' : uniqueID }]; } export function useDescribedBy ( ): readonly [ string , { 'aria-describedby' : string } ] { const uniqueID…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.