GCTC-NTGC / gc-digital-talent

GC Digital Talent is the new recruitment platform for digital and tech jobs in the Government of Canada. // Talents numériques du GC est la nouvelle plateforme de recrutement pour les emplois numériques et technologiques au gouvernement du Canada.
https://talent.canada.ca
GNU Affero General Public License v3.0
22 stars 9 forks source link

Setup for Accessibility testing (storybook for starters) #3496

Closed gobyrne closed 2 years ago

gobyrne commented 2 years ago

Gray and patcon felt that storybook was the most appropriate path forward in the short term.

Timeline would be for this work to happen either in the next sprint, or this sprint (PPPRE) if someone finds time.

There were a number of other proposals (opening UAT up to public with or without disabling auth, heroku or other external host) but Gray and patcon both thought they'd present challenges in short-term. Please do chime in if you think differently :)

Proposed To Dos

patcon commented 2 years ago

This may be helpful to stitch together flows in storybook: https://github.com/storybookjs/storybook/blob/next/code/addons/links/README.md

In longer term, I really like the idea of us hosting our own dev environment for accessibility testing! This has the added perk of helping us practice/learn from building a [continuous] deployment process, with a strong supporting rationale (removing pain points for accessibility testers).

esizer commented 2 years ago

Going to take a stab at this. Debating an estimate between 3-5, what are your thoughts @patcon ?

esizer commented 2 years ago

So, I put together a UseProfile story which sets the links using the hrefTo function from the recommended addon. It seems to do exactyl what we need it to do but it is not navigating properly. My initial suspicion is that it is related to #3422 . If no one picks this up, I may circle back once that issue has been resolved.

Example

 const [paths, setPaths] = React.useState<Record<string, string> | null>(null);
  const getPaths = React.useCallback(async () => {
    const newPaths = {
      about: await hrefTo("AboutMeForm", "Individual About Me"),
      ...
    };

    setPaths(newPaths);
  }, []);

  React.useEffect(() => {
    getPaths();
  }, [getPaths]);

  return (
    <UserProfile
      applicant={fakeUserData as Applicant}
      sections={{
        ...
          about: { isVisible: true, editUrl: paths.about },
        ...
      }}
    />
  );
esizer commented 2 years ago

@gobyrne These are the links to each story that represent what we currently have for the applicant profiles.

Links

Pages

Forms

gobyrne commented 2 years ago

These look great @esizer. Would it be easy to get the interactive part of the Diversity, Equity and Inclusion Form working in storybook? I would like to get that tested.

If that is going to be work, feel free to break it into a separate issue. I intend to immediately start using these links to get the interactive components tested in isolation.

I love that we can use the Experience Form to test the skills UI! I'm concerned about accessibility for that one.

esizer commented 2 years ago

Would it be easy to get the interactive part of the Diversity, Equity and Inclusion Form working in storybook? I would like to get that tested.

@gobyrne , Got that in with https://github.com/GCTC-NTGC/gc-digital-talent/pull/3636