diff --git a/config.json b/config.json index 269c2992..0b507d0b 100644 --- a/config.json +++ b/config.json @@ -80,7 +80,7 @@ }, { "name": "18.x", - "branch": "branch/v18", + "branch": "travis.rodgers/tooltip-test", "isDefault": true }, { diff --git a/src/components/Tile/Tile.tsx b/src/components/Tile/Tile.tsx index 8d55faa3..a94a2d87 100644 --- a/src/components/Tile/Tile.tsx +++ b/src/components/Tile/Tile.tsx @@ -6,15 +6,15 @@ interface TileProps { icon: React.ReactNode; to: string; name: string; + tooltip?: string; } -export default function Tile({ icon, to, name }: TileProps) { +export default function Tile({ icon, to, name, tooltip }: TileProps) { + const ariaLabel = tooltip ? `${name}: ${tooltip}` : name; return ( - <> - - {icon} - {name} - - + + {icon} + {name} + ); } diff --git a/src/components/TileGrid/TileGrid.tsx b/src/components/TileGrid/TileGrid.tsx index 81f69aa5..d99f2c3e 100644 --- a/src/components/TileGrid/TileGrid.tsx +++ b/src/components/TileGrid/TileGrid.tsx @@ -7,6 +7,7 @@ interface TileGridProps { icon: React.ReactNode; to: string; name: string; + tooltip?: string; }[]; } @@ -14,7 +15,7 @@ export default function TileGrid({ tiles }: TileGridProps) { return (
{tiles.map((tile, index) => ( - + ))}
);