{"id":13804453,"url":"https://github.com/ember-a11y/ember-a11y-landmarks","last_synced_at":"2025-03-30T11:31:33.453Z","repository":{"id":48444954,"uuid":"91258581","full_name":"ember-a11y/ember-a11y-landmarks","owner":"ember-a11y","description":"Ember addon to help with landmark roles for better accessibility","archived":false,"fork":false,"pushed_at":"2021-07-26T06:09:06.000Z","size":5054,"stargazers_count":19,"open_issues_count":20,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-25T14:05:35.165Z","etag":null,"topics":["a11y","accessibility","ember","ember-addon","landmark","landmark-roles"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ember-a11y.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-14T17:04:01.000Z","updated_at":"2024-05-30T02:56:53.000Z","dependencies_parsed_at":"2022-08-25T14:41:35.970Z","dependency_job_id":null,"html_url":"https://github.com/ember-a11y/ember-a11y-landmarks","commit_stats":null,"previous_names":["melsumner/ember-a11y-landmarks"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-a11y%2Fember-a11y-landmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-a11y%2Fember-a11y-landmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-a11y%2Fember-a11y-landmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ember-a11y%2Fember-a11y-landmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ember-a11y","download_url":"https://codeload.github.com/ember-a11y/ember-a11y-landmarks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314011,"owners_count":20757450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a11y","accessibility","ember","ember-addon","landmark","landmark-roles"],"created_at":"2024-08-04T01:00:48.119Z","updated_at":"2025-03-30T11:31:33.027Z","avatar_url":"https://github.com/ember-a11y.png","language":"JavaScript","funding_links":[],"categories":["Packages"],"sub_categories":["a11y"],"readme":"# ember-a11y-landmarks\n\n[![Latest NPM release](https://img.shields.io/npm/v/ember-a11y-landmarks.svg)](https://www.npmjs.com/package/ember-a11y-landmarks)\n[![TravisCI Build Status](https://img.shields.io/travis/ember-a11y/ember-a11y-landmarks/master.svg?label=TravisCI)](https://travis-ci.org/ember-a11y/ember-a11y-landmarks)\n\nThe `ember-a11y-landmarks` addon helps you assign the `role` attribute that should go on landmark tags like `\u003cheader\u003e` and `\u003cnav\u003e`, without needing to learn the intricacies of when to add roles or what they should be. A landmark is a special kind of semantic HTML tag that Assistive technology(AT) uses to parse a page correctly.\n\nWhen is this addon needed? In a typical Ember app, almost everything gets wrapped in a `\u003cdiv\u003e`, but this can be confusing to tools like screen readers. The Assistive Technology expects that either landmark elements are direct descendants of the `\u003cbody\u003e` element or that they have a particular `role` attribute. `ember-a11y-landmarks` handles this problem for you.\n\n## How this addon works\n\nThis addon helps add the correct roles to the following elements:\n\n| tagName | role          |\n| ------- | ------------- |\n| header  | banner        |\n| nav     | navigation    |\n| aside   | complementary |\n| main    | main          |\n| form    | form          |\n| footer  | contentinfo   |\n\nWhile semantic landmark tags are best for accessibility, some developers may be faced with working on an app that uses `div` tags instead. For those cases, this addon provides a way to add roles to a `div` element until they can be refactored (see [Div Usage](#div-usage)).\n\n```bash\nember install ember-a11y-landmarks\n```\n\n## Landmark Tag Usage\n\nThis addon is used like a block component. Just set the `tagName` attribute to `header`, `nav`, `aside`, `main`, `form`, or `footer`, and put your content inside the block. For example, here's a header:\n\n```hbs\n\u003cA11yLandmark @tagName=\"header\"\u003e\n    This is my header content\n\u003c/A11yLandmark\u003e\n```\n\nThe resulting markup in the DOM will have the correct tag type and the role that should be used for that tag:\n\n    \u003cheader id=\"ember337\" role=\"banner\" class=\"ember-view\"\u003e\n        This is my header content\n    \u003c/header\u003e\n\n## Div Usage\n\nIf a developer must use a div instead of a semantic tag like `\u003cheader\u003e`, define `landmarkRole` instead of `tagname`. You can look up the correct landmark role in the  [How this addon works](#how-this-addon-works) table. Here's a header example:\n\n```hbs\n  \u003cA11yLandmark @landmarkRole=\"banner\"\u003e\n      This is my header content (that should be refactored later to go inside a real header tag)\n  \u003c/A11yLandmark\u003e\n```\n\nIn the DOM markup, this will result in a `div` with the specified `role`:\n\n    \u003cdiv id=\"ember337\" role=\"banner\" class=\"ember-view\"\u003e\n         This is my header content (that should be refactored later to go inside a real header tag)\n    \u003c/div\u003e\n\n## Form/Search Usage\n\nIf defining a form, no additional `landmarkRole` is required. However, if the form will be used as a search, then the `landmarkRole` value should be set to `search`.\n\nForm:\n\n```hbs\n\u003cA11yLandmark @tagName=\"form\"\u003e\n    ...\n\u003c/A11yLandmark\u003e\n```\n\nSearch:\n\n```hbs\n\u003cA11yLandmark @tagName=\"form\" @landmarkRole=\"search\"\u003e\n    ...\n\u003c/A11yLandmark\u003e\n```\n\n## Contributions\n\nContributions to this project are encouraged.\n\n## Compatibility\n\n-   Ember.js v3.12 or above\n-   Ember CLI v2.13 or above\n-   Node.js v10 or above\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-a11y%2Fember-a11y-landmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fember-a11y%2Fember-a11y-landmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fember-a11y%2Fember-a11y-landmarks/lists"}