Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

ProductAttributeControl: Polish style, screen reader interaction #412

Merged
merged 7 commits into from
Feb 8, 2019

Conversation

ryelle
Copy link
Member

@ryelle ryelle commented Feb 7, 2019

Following up from #405 - cleans up the styling to match the design & fix missing aria info for screen reader users.

Accessibility

Screenshots

Example of an attribute with 2 terms selected

screen shot 2019-02-07 at 5 30 44 pm

On the initial load, all attributes are collapsed. If an item has no terms, it's disabled (unclickable and dimmed)

all-collapse

EDIT: forgot to add a "Before" - this is what it looks like on master now:

screen shot 2019-02-07 at 5 44 53 pm

How to test the changes in this Pull Request:

  1. Add Products By Attribute block
  2. Click around selecting different attribute combos
  3. Try navigating the block with a screen reader
  4. Attributes should be flagged as "expanded" or "collapsed" depending on if they're selected
  5. Selecting attributes & loading terms should work, and you should be able to select terms once they're loaded.

@ryelle ryelle added [Status] Needs Review focus: components Work that introduces new or updates existing components. labels Feb 7, 2019
@ryelle ryelle added this to the 1.4.0 Sprint milestone Feb 7, 2019
@ryelle ryelle self-assigned this Feb 7, 2019
@ryelle ryelle requested review from jameskoster and a team February 7, 2019 22:43
Copy link
Contributor

@joshuatf joshuatf left a comment

Choose a reason for hiding this comment

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

Looks good! Pre-approving pending one design question.

&.is-loading {
justify-content: center;

.components-spinner {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be horizontally centered?

Copy link
Member

@jameskoster jameskoster left a comment

Choose a reason for hiding this comment

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

Couple of small issues;

  1. The count on the attribute rows should have a different treatment to the count on the term rows as they're counting different things. See here for the latest design. If adding the label to the count on the attribute row is problematic (or a lot of work) then we should just remove that count - the product count on the term row is more important.
  2. Speaking of which, I'm not seeing the product count on the term rows.
  3. I'm not seeing the up/down chevrons. Latest Chrome. https://cloudup.com/c4KqFiX_CSH

@ryelle
Copy link
Member Author

ryelle commented Feb 8, 2019

I'm not seeing the product count on the term rows.

I was basing it off this design linked in #405 - I assumed that one was the latest. Now I see that that's the Featured Product design 🙃

Does that mean the background for the terms should be that darker color, with borders between?

If adding the label to the count on the attribute row is problematic (or a lot of work) then we should just remove that count - the product count on the term row is more important.

I can easily add the product count back to the terms. It's not built to allow for different styling of the count though - but that would also mean we can't do it on the Featured Product variations count, so if that's important we can look at changing the SearchListControl (but not for this iteration).

I'm not seeing the up/down chevrons

Strange– if you inspect element in the empty space next to the count, do you see the :after element on the button? I'm also using latest Chrome, so maybe... an extension you have is blocking the SVG background?

@jameskoster
Copy link
Member

Does that mean the background for the terms should be that darker color, with borders between?

No, the current row styling is good :)

It's not built to allow for different styling of the count though

Let's just go ahead and remove the terms count. I'm not sure how useful that info is anyway. We can revisit when we add variation support to the featured product block.

do you see the :after element on the button?

Yeah the code looks good. For some reason the icon just isn't rendering. I only have one browser extension which I disabled - no dice. It works in Safari. Other instances of svg's as background (e.g. https://codepen.io/netsi1964/pen/HGJms) are working fine. Weird.

@ryelle ryelle force-pushed the update/products-attr-control-style branch from 2e2029c to 475f8cd Compare February 8, 2019 19:53
@ryelle ryelle dismissed jameskoster’s stale review February 8, 2019 19:56

updated the row counts for attributes & terms

@ryelle
Copy link
Member Author

ryelle commented Feb 8, 2019

I'm going to go ahead and merge this since the design feedback has been addressed. We can make any "last-minute" tweaks on Monday before releasing 1.4 if we need to.

@ryelle ryelle merged commit a36db08 into master Feb 8, 2019
@ryelle ryelle deleted the update/products-attr-control-style branch February 18, 2019 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: components Work that introduces new or updates existing components.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants