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

Give invalid yet still useful role="text" an ESLint exemption #3443

Closed
wants to merge 3 commits into from

Conversation

frederickobrien
Copy link
Contributor

@frederickobrien frederickobrien commented Feb 9, 2022

This deletes a couple of ESLint disable rules in productOption and hero.tsx which was allowing role="text" to be used. role="text" helps screen readers to understand that elements are all part of a single piece of text that should be read in one go. Here is an example by Open Inclusion:

<span role="text">I haven't smoked for 
<span class="highlight">20</span> years.</span>

It was considered for inclusion in ARIA1.1 back in 2017 but didn't make the cut and has lived in a kind of limbo ever since. It has some browser support, and in leu of something better is still used to improve the screen reader experience. As a result anallowedInvalidRoles option was added to the ESLint aria-role rule last December. The full rule details can be read here.

TL;DR: We don't need to make a special exception for role="text" because ESLint now accommodates it.

@frederickobrien frederickobrien requested a review from a team February 9, 2022 16:15
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

Size Change: 0 B

Total Size: 2.18 MB

ℹ️ View Unchanged
Filename Size
./public/compiled-assets/javascripts/ausMomentMap.js 110 kB
./public/compiled-assets/javascripts/contributionsCheckoutInEpic.js 207 kB
./public/compiled-assets/javascripts/contributionsLandingPage.js 188 kB
./public/compiled-assets/javascripts/contributionsRedirectStyles.js 506 B
./public/compiled-assets/javascripts/digitalSubscriptionCheckoutPage.js 159 kB
./public/compiled-assets/javascripts/digitalSubscriptionCheckoutPageThankYouExisting.js 92.4 kB
./public/compiled-assets/javascripts/digitalSubscriptionLandingPage.js 152 kB
./public/compiled-assets/javascripts/downForMaintenancePage.js 78.3 kB
./public/compiled-assets/javascripts/error404Page.js 78.3 kB
./public/compiled-assets/javascripts/error500Page.js 78.3 kB
./public/compiled-assets/javascripts/favicons.js 747 B
./public/compiled-assets/javascripts/paperSubscriptionCheckoutPage.js 157 kB
./public/compiled-assets/javascripts/paperSubscriptionLandingPage.js 98.6 kB
./public/compiled-assets/javascripts/payPalErrorPage.js 74.6 kB
./public/compiled-assets/javascripts/payPalErrorPageStyles.js 505 B
./public/compiled-assets/javascripts/promotionTerms.js 84.7 kB
./public/compiled-assets/javascripts/showcasePage.js 93.2 kB
./public/compiled-assets/javascripts/subscriptionsLandingPage.js 83.6 kB
./public/compiled-assets/javascripts/subscriptionsRedemptionPage.js 133 kB
./public/compiled-assets/javascripts/unsupportedBrowserStyles.js 506 B
./public/compiled-assets/javascripts/weeklySubscriptionCheckoutPage.js 153 kB
./public/compiled-assets/javascripts/weeklySubscriptionLandingPage.js 98.6 kB
./public/compiled-assets/webpack/0.js 5.79 kB
./public/compiled-assets/webpack/23.js 17.5 kB
./public/compiled-assets/webpack/24.js 22.4 kB
./public/compiled-assets/webpack/25.js 11.6 kB
./public/compiled-assets/webpack/26.js 2.37 kB
./public/compiled-assets/webpack/27.js 1.84 kB

compressed-size-action

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

TypeScript errors decreased by 2 😎
ESLint errors decreased by 674 🥳

typescript-monitor-action

@frederickobrien frederickobrien removed the request for review from a team February 9, 2022 16:30
@frederickobrien frederickobrien changed the title Remove TS errors from productOption components Give invalid yet still useful role="text" an ESLint exemption Feb 9, 2022
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.

None yet

1 participant