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

feat: EVER-13206: a11y focus states for buttons and links #317

Merged
merged 4 commits into from
May 25, 2021

Conversation

pixelbandito
Copy link
Contributor

No description provided.

[state]: true,
}),
{}
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

another way to do this might be something like this:

const trueStates = Object.fromEntries(
    stateCombo.map((state) => [state, true])
  );

not sure why, but I always need to stare at .reduce's for a while to grok them. but your way feels very React-y

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, it's really hard to read. I'll take a crack at refactoring. I didn't even know about fromEntries, I have a feeling we're going to be friends.

@pixelbandito pixelbandito merged commit 774a16a into v3-alpha May 25, 2021
@pixelbandito pixelbandito deleted the feature-EVER-13206-a11y-focus-states branch May 25, 2021 13:58
pixelbandito added a commit that referenced this pull request Aug 20, 2021
* feat: EVER-13206: a11y focus states for buttons and links

* test: EVER-13206 Add test for outline class name, restore test for primary level class name

* refactor: EVER-13206 Remove todo comment

* refactor: EVER-13206: Clean up story truthy prop maker
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.

3 participants