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

chore: update accessibility-checker to 3.1.79 and turns rules on #18317

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

2nikhiltom
Copy link
Contributor

@2nikhiltom 2nikhiltom commented Jan 9, 2025

Closes #18227

Update accessibility-checker to 3.1.79

Turns on label_name_visible, aria_attribute_conflict and target_spacing_sufficient rules back on inside 'toHaveNoACViolations' of both playwright and jest configs

Made changes in SCSS styles to accommodate the fix for a11y violations

Changelog

Changed

  • styles changes in fluid-text-area.scss and text-area.scss

Testing / Reviewing

Verify no ci failures
Verify no a11y violations
Verify if the styles changes are acceptable

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 8b0f989
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/67975bb475c7480009461b58
😎 Deploy Preview https://deploy-preview-18317--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 8b0f989
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/67975bb4cc926b000882f2ea
😎 Deploy Preview https://deploy-preview-18317--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 8b0f989
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/67975bb4d87c1000089fd344
😎 Deploy Preview https://deploy-preview-18317--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 7c7ddcc
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6798b1464e5c120008d5824e
😎 Deploy Preview https://deploy-preview-18317--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 7c7ddcc
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-web-components/deploys/6798b14694caa00008914e00
😎 Deploy Preview https://deploy-preview-18317--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Jan 27, 2025

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 7c7ddcc
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6798b1462d03420009490939
😎 Deploy Preview https://deploy-preview-18317--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.16%. Comparing base (3ce0c86) to head (7c7ddcc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #18317   +/-   ##
=======================================
  Coverage   84.16%   84.16%           
=======================================
  Files         408      408           
  Lines       14449    14449           
  Branches     4700     4646   -54     
=======================================
  Hits        12161    12161           
- Misses       2123     2124    +1     
+ Partials      165      164    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@2nikhiltom 2nikhiltom changed the title chore: update accessibility-checker to 4.0.0rc chore: update accessibility-checker to 3.1.79 and turnens on rules Jan 27, 2025
@2nikhiltom 2nikhiltom changed the title chore: update accessibility-checker to 3.1.79 and turnens on rules chore: update accessibility-checker to 3.1.79 and turns rules on Jan 27, 2025
@2nikhiltom 2nikhiltom marked this pull request as ready for review January 27, 2025 13:27
@2nikhiltom 2nikhiltom requested a review from a team as a code owner January 27, 2025 13:27
@tay1orjones tay1orjones requested review from a team, kiran-ravindra-ibm and laurenmrice and removed request for a team and kiran-ravindra-ibm January 27, 2025 17:20
@tay1orjones
Copy link
Member

@2nikhiltom could you share specifically what a11y rule this fixes and why? This will be a spec change for the component that we'll need to populate everywhere. I'm curious if there's anything else we could try to avoid a spec change?

@laurenmrice here's the visual diff for this

2025-01-27 at 11 19 00-email-Google Chrome

@laurenmrice
Copy link
Member

laurenmrice commented Jan 27, 2025

@tay1orjones Thanks Taylor. @2nikhiltom If possible we should avoid this spec change. The design specs should stay as is.

@2nikhiltom
Copy link
Contributor Author

2nikhiltom commented Jan 28, 2025

@tay1orjones
Accessibility violation detected where toggletip button didn't have sufficient spacing (12px) from textarea
Error: "Undersized target 'button' does not have sufficient spacing of 12 CSS pixels from another target 'textarea'"

image

The issue is happening in textarea with a tooltip variant .

const ToggleTip = (
  <>
    <ToggletipLabel>Text Area label</ToggletipLabel>
    <span role="presentation">
      <Toggletip align="top-left">
        <ToggletipButton label="Show information">
          <Information />
        </ToggletipButton>
        <ToggletipContent>
          <p>Additional field information here.</p>
        </ToggletipContent>
      </Toggletip>
    </span>
  </>
);

export const DefaultWithTooltip = () => (
  <FluidTextArea labelText={ToggleTip} placeholder="Placeholder text" />
);

I feel one way to fix this without modifying the component source or styles is to wrap the Toggletip in a semantic span with role="presentation" the wrapper affects the accessibility tree spacing calculation (storybook change)

@2nikhiltom 2nikhiltom closed this Jan 28, 2025
@2nikhiltom 2nikhiltom reopened this Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants