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

Make question-info a heading #79

Merged
merged 1 commit into from
Dec 11, 2024
Merged

Conversation

RoyEJohnson
Copy link
Contributor

@RoyEJohnson RoyEJohnson commented Dec 5, 2024

@RoyEJohnson RoyEJohnson force-pushed the make-question-info-a-heading branch from 658dfbc to a2934a6 Compare December 10, 2024 19:18
@RoyEJohnson RoyEJohnson marked this pull request as ready for review December 10, 2024 19:18
@RoyEJohnson RoyEJohnson requested a review from a team as a code owner December 10, 2024 19:18
@RoyEJohnson RoyEJohnson requested review from bethshook and removed request for a team December 10, 2024 19:18
@@ -243,7 +243,7 @@ const StepCard = ({
<StepCardHeader>
<div>
{leftHeaderChildren}
<div className="question-info">
<div className="question-info" role="heading" aria-level={2}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like it's preferable to just use a heading tag: https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA12

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They cite styling as a reason it's preferable, but the reason I didn't use a heading tag was that I didn't want the style to change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Native HTML elements have implicit styling and features that won't necessarily be replicated with ARIA equivalents. For instance, heading elements will have specific styling adjustments made when viewing a page in a browser's Reader Mode.

I was more wondering about that second bit but it looks like our iframe doesn't currently render at all in reader mode...

@RoyEJohnson RoyEJohnson force-pushed the make-question-info-a-heading branch from a2934a6 to 3921300 Compare December 11, 2024 22:27
@RoyEJohnson RoyEJohnson merged commit 5d59a4e into main Dec 11, 2024
1 check passed
@RoyEJohnson RoyEJohnson deleted the make-question-info-a-heading branch December 11, 2024 22:30
@RoyEJohnson RoyEJohnson restored the make-question-info-a-heading branch December 18, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants