βœ… Web Accessibility - important only

Semantic Tags in Html
semantics html dom image

πŸ‘‰ aria-label : give name for screen reader, not visible on screen

<button aria-label="trash-button">Move to trash</button>

πŸ‘‰ aria-labelledby : use another element as name

<h2 id="sectionTitle">Profile Info</h2>
<div aria-labelledby="sectionTitle">
  user info...
</div>

πŸ‘‰ aria-hidden : hide from screen reader

<span aria-hidden="true">πŸ”₯</span>

πŸ‘‰ aria-live : notify screen reader on content change

<div aria-live="polite">You have 3 new messages</div>

πŸ‘‰ aria-expanded : show open/close state

<button aria-expanded="false">Menu</button>

πŸ‘‰ aria-controls : indicate controlled element

<button aria-controls="menuList" aria-expanded="false">Menu</button>
<ul id="menuList"> ... </ul>

πŸ‘‰ aria-current : indicate current page in navigation

<a href="/home" aria-current="page">Home</a>

πŸ‘‰ role : describe element type (not aria-role)

<button aria-label="Submit form">Submit</button>
<h1 role="heading">Heading</h1>
<nav role="navigation">Navigation</nav>

βœ… Not Found page in next.js

πŸ‘‰ Create `not-found.js` page at root level for custom error page

πŸ‘‰ Separate not-found page only works in dynamic routes

πŸ‘‰ Use notFound() to trigger 404 programmatically

βœ… Route Grouping and Private Routes

πŸ‘‰ Mainly used to organize routes

πŸ‘‰ Create group routes folder wrapped with ( )

πŸ‘‰ Example: about and services routes in name - Dhiraj Arya

πŸ‘‰ Private routes mean app routes based on file & folder, not dynamic data

πŸ‘‰ To create private routes, prefix folder name with _underscore

πŸ‘‰ If needed, use %5F instead of _ in route paths