Skip to content

A platform for community discussion. Free, open, simple.

A11Y: remove role from `aside` wrapping `blockquote` (#38555)

Kris753716c294c3
diff --git a/frontend/discourse/app/components/post/quoted-content.gjs b/frontend/discourse/app/components/post/quoted-content.gjs
index 13b2cdcd2ba..4cc53857ca3 100644
--- a/frontend/discourse/app/components/post/quoted-content.gjs
+++ b/frontend/discourse/app/components/post/quoted-content.gjs
@@ -170,6 +170,7 @@ export default class PostQuotedContent extends Component {
{{! template-lint-disable no-unnecessary-concat }}
<this.OptionalWrapperComponent
...attributes
+ role="none"
class={{concatClass
"quote"
(if @quotedPostNotFound "quote-post-not-found")
diff --git a/frontend/discourse/app/lib/post-cooked-html-decorators/quote-controls.gjs b/frontend/discourse/app/lib/post-cooked-html-decorators/quote-controls.gjs
index 37405503f37..c3ddbce5aa3 100644
--- a/frontend/discourse/app/lib/post-cooked-html-decorators/quote-controls.gjs
+++ b/frontend/discourse/app/lib/post-cooked-html-decorators/quote-controls.gjs
@@ -73,6 +73,8 @@ export default function quoteControls(element, context) {
wrapperElement: aside,
};
+ aside.setAttribute("role", "none");
+
// Render the PostQuotedContent component in place of original quote
helper.renderGlimmer(
aside,