Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SITES-2874 Accessibility) - Visual list is not marked up as list. #320

Closed
wants to merge 14 commits into from
1 change: 1 addition & 0 deletions coral-base-list/src/scripts/BaseList.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ const BaseList = (superClass) => class extends superClass {
super.render();

this.classList.add(CLASSNAME);
this.setAttribute('role', 'list');

// Default reflected attributes
if (!this._interaction) {
Expand Down
1 change: 1 addition & 0 deletions coral-base-list/src/scripts/BaseListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ const BaseListItem = (superClass) => class extends BaseLabellable(superClass) {
// The attribute that makes different types of list items co-exist
// This is also used for event delegation
this.setAttribute('coral-list-item', '');
this.setAttribute('role', 'listitem');

// Fetch or create the content content zone element
const content = this._elements.content;
Expand Down
1 change: 0 additions & 1 deletion coral-component-list/src/scripts/AnchorList.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const AnchorList = Decorator(class extends BaseList(BaseComponent(HTMLElement))
render() {
super.render();

this.classList.add(CLASSNAME);
}
});

Expand Down
Loading