{"meta":{"title":"Auditor de acessibilidade","intro":"Instruções para testes e conformidade abrangentes de acessibilidade na Web.","product":"GitHub Copilot","breadcrumbs":[{"href":"/pt/copilot","title":"GitHub Copilot"},{"href":"/pt/copilot/tutorials","title":"Tutoriais"},{"href":"/pt/copilot/tutorials/customization-library","title":"Biblioteca de personalização"},{"href":"/pt/copilot/tutorials/customization-library/custom-instructions","title":"Instruções personalizadas"},{"href":"/pt/copilot/tutorials/customization-library/custom-instructions/accessibility-auditor","title":"Auditor de acessibilidade"}],"documentType":"article"},"body":"# Auditor de acessibilidade\n\nInstruções para testes e conformidade abrangentes de acessibilidade na Web.\n\n> \\[!NOTE]\n>\n> * Os exemplos nesta biblioteca são para servir de inspiração. Ajuste-os para serem mais específicos para seus projetos, linguagens e processos de equipe.\n> * Para exemplos de instruções personalizadas com contribuição da comunidade para linguagens e cenários específicos, confira o repositório de [Personalizações Incríveis do GitHub Copilot](https://github.com/github/awesome-copilot/blob/main/docs/README.instructions.md).\n> * Você pode aplicar instruções personalizadas em diferentes escopos, dependendo da plataforma ou do IDE em que você está criando. Para obter mais informações, confira \"[Sobre a personalização das respostas do GitHub Copilot](/pt/copilot/concepts/response-customization)\".\n\nO exemplo a seguir mostra um arquivo `accessibility.instructions.md` específico de caminho que se aplica somente a arquivos HTML em seu repositório e orienta o GitHub Copilot a gerar HTML acessível e inclusivo que siga as diretrizes WCAG. Para obter mais informações sobre arquivos de instruções específicas do caminho, consulte [Adicionando instruções personalizadas do repositório para GitHub Copilot](/pt/copilot/how-tos/configure-custom-instructions/add-repository-instructions#using-one-or-more-instructionsmd-files).\n\n````text copy\n---\napplyTo: **/*.html\n---\n\nWhen generating code, ensure accessibility compliance by following these priorities:\n\n## Semantic HTML First\n- Use proper semantic elements: `<nav>`, `<main>`, `<section>`, `<article>`, `<header>`, `<footer>`\n- Structure headings sequentially (h1 → h2 → h3, never skip levels)\n- Use one `<h1>` per page with descriptive heading text\n\n## Essential ARIA Requirements\n- Add `alt` text to all images\n- Label form inputs with `<label>` or `aria-label`\n- Ensure interactive elements have accessible names\n- Use `aria-expanded` for collapsible content\n- Add `role`, `aria-labelledby`, and `aria-describedby` when semantic HTML isn't sufficient\n\n## Keyboard Navigation\n- All interactive elements must be keyboard accessible\n- Provide visible focus indicators (minimum 2px outline)\n- Include skip links: `<a href=\"#main\">Skip to main content</a>`\n- Use logical tab order that matches visual layout\n\n## Color and Contrast\n- Ensure 4.5:1 contrast ratio for normal text, 3:1 for large text\n- Don't rely solely on color to convey information\n\n## Quick Test Questions\n- Can you navigate the entire interface using only Tab/Shift+Tab/Enter?\n- Are all images and icons properly described?\n- Can screen reader users understand the content and functionality?\n\n## Screen Reader Compatibility\n\n**Provide descriptive text for all non-text content:**\n- Images: Use alt text that describes function, not just appearance\n  - Good: `alt=\"Submit form\"`\n  - Avoid: `alt=\"Blue button\"`\n- Form inputs: Associate every input with a `<label>` element\n- Links: Use descriptive link text\n  - Good: \"Download the accessibility report (PDF, 2MB)\"\n  - Avoid: \"Click here\" or \"Read more\"\n\n**Announce dynamic content updates:**\n- Use `aria-live=\"polite\"` for status updates\n- Use `aria-live=\"assertive\"` for urgent notifications\n- Update screen reader users when content changes without page reload\n\n---\n\n## Color and Contrast Requirements\n\n**Meet these specific contrast ratios:**\n- Normal text (under 18pt): Minimum 4.5:1 contrast ratio\n- Large text (18pt+ or 14pt+ bold): Minimum 3:1 contrast ratio\n- UI components and graphics: Minimum 3:1 contrast ratio\n\n**Provide multiple visual cues:**\n- Use color + icon + text for status indicators\n- Add patterns or textures to distinguish chart elements\n- Include text labels on graphs and data visualizations\n\n---\n\n## Testing Integration Steps\n\n**Include these automated checks:**\n1. Run axe-core accessibility scanner in CI/CD pipeline\n2. Test with lighthouse accessibility audit\n3. Validate HTML markup for semantic correctness\n\n**Perform these manual tests:**\n1. Navigate entire interface using only Tab and arrow keys\n2. Test with screen reader (NVDA on Windows, VoiceOver on Mac)\n3. Verify 200% zoom doesn't break layout or hide content\n4. Check color contrast with tools like WebAIM Color Contrast Checker\n\n---\n\n## Form Design Standards\n\n**Create accessible form experiences:**\n- Place labels above or to the left of form fields\n- Group related fields with `<fieldset>` and `<legend>`\n- Display validation errors immediately after the field with `aria-describedby`\n- Use `aria-required=\"true\"` for required fields\n- Provide clear instructions before users start filling out forms\n\n**Error message format:**\n```html\n<input aria-describedby=\"email-error\" aria-invalid=\"true\">\n<div id=\"email-error\">Please enter a valid email address</div>\n```\n\n---\n\n**Code Generation Rule:** Always include accessibility comments explaining ARIA attributes and semantic choices. Test code with keyboard navigation before suggesting it's complete.\n\n````\n\n## Leitura adicional\n\n* [Sobre a personalização das respostas do GitHub Copilot](/pt/copilot/concepts/response-customization) – Visão geral da personalização de resposta no GitHub Copilot\n* [Adicionar instruções personalizadas para Copilot](/pt/copilot/how-tos/configure-custom-instructions): como configurar instruções personalizadas\n* [Personalizações incríveis do GitHub Copilot](https://github.com/github/awesome-copilot/blob/main/README.md) – repositório de instruções personalizadas com a contribuição da comunidade e outras personalizações para linguagens e cenários específicos"}