=== AddonLogic ARIA Landmark Adder ===
Contributors: snehalpancholi
Tags: accessibility, aria, landmarks, screen-reader, wcag
Requires at least: 6.0
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 8.1
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Adds appropriate ARIA landmark roles to common theme regions via configurable CSS selectors, improving navigation for screen reader users.

== Description ==

AddonLogic ARIA Landmark Adder bridges the gap between older WordPress themes and modern WCAG 2.1 landmark requirements. ARIA landmarks allow screen reader users to jump directly between major page regions (banner, navigation, main content, sidebar, footer) without reading through every element.

Many themes rely on native HTML5 sectioning elements (`<header>`, `<main>`, `<footer>`) but lack explicit `role` attributes. Others use `<div>`-based layouts entirely. This plugin maps CSS selectors to ARIA roles and adds the attributes via JavaScript on page load.

**Features:**

* 5 default mappings: header→banner, nav→navigation, main→main, aside→complementary, footer→contentinfo
* Fully configurable: add, remove, or edit any selector→role mapping from the admin UI
* Skip existing roles: will not overwrite role attributes already set in the HTML
* Dynamic admin UI with add/remove rows without page reload
* Valid roles enforced server-side: banner, navigation, main, complementary, contentinfo, search, form, region

== Installation ==

1. Upload the `aria-landmark-adder` folder to `/wp-content/plugins/`
2. Activate via **Plugins** in the WordPress admin
3. Go to **Settings → ARIA Landmarks** to review and adjust the default mappings for your theme

== Frequently Asked Questions ==

= How do I know which selectors my theme uses? =
Right-click on your site header in a browser and choose "Inspect". Look for the HTML element wrapping the header area and note its tag, id, and class names. Use that as your selector.

= Does this add duplicate landmarks? =
If "Skip Existing Roles" is checked (default), the script will not add a role attribute to any element that already has one. This prevents duplication when themes already define some landmarks.

= What if a selector matches multiple elements? =
All matching elements receive the role. For the `navigation` role, this is expected (primary nav + secondary nav). For `main`, you should use a selector that targets exactly one element.

== Changelog ==

= 1.0.0 =
* Initial release
