-
Notifications
You must be signed in to change notification settings - Fork 4
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
[Q1 FY25 | SEO] Discover More Cards #248
base: stage
Are you sure you want to change the base?
Conversation
… text on back of card
…dge, and on wide screens space between cards remains uniform
…f the view and gaps remain uniform on wide screens
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #248 +/- ##
==========================================
- Coverage 67.12% 66.43% -0.69%
==========================================
Files 63 62 -1
Lines 10353 10345 -8
==========================================
- Hits 6949 6873 -76
- Misses 3404 3472 +68 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
scroll-behavior: smooth; | ||
padding: 0 16px; | ||
scroll-padding: 0 16px; | ||
.gallery, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this might affect other galleries on the same page right? Maybe this line is not wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are the default rules that existed for the gallery - in order to avoid duplicating rules - I added the variant rule to all the rules that are identical
.discover-cards.more .card { | ||
background-color: transparent; | ||
min-width: 250px; | ||
width: 250px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you have cases where both need to be defined to be the same values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I don't include min-width- the cards collapse when the view gets small - these rules ensure no matter how wide the viewport - the cards are always the same size
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i see, there are conflicting rules for .discover-cards .cards-container .card
I would recommend making them min-width: initial
to be clearer that you're intentionally overriding other rules tho
const isFlipped = card.classList.contains('is-flipped'); | ||
card.setAttribute( | ||
'aria-label', | ||
isFlipped ? `Go back to ${card.cardTitle}` : `Learn more about ${card.cardTitle}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do these need to be authorable? What about localization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No authoring requirements were given for these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you check with the designers and authors? Because technically as an accessibility practice, those labels should be in different languages when deployed internationally. Otherwise users will only hear about those labels in the hardcoded English values.
But it can be a follow up too, if it's going to be deployed on EN pages first.
@fullcolorcoder are you familiar with how Milo supports authoring for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsandland @JingleH Placeholders can handle this, and authoring is generally aware of that but if it can be avoided I'd favor that and I suspect they would too if given the option. Since this isn't just a test/jdi, I'd pair up with Earnest and come to an agreement since authoring efforts would be duplicated if we change the approach as a fast follow.
|
||
card.setAttribute('tabindex', '0'); | ||
card.setAttribute('role', 'button'); | ||
card.setAttribute('aria-label', `Learn more about ${card.cardTitle}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as below: do these need to be authorable? What about localization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have reached out to design but no heard back - can do a fast follow in a future pr
|
||
const cards = block.querySelectorAll(':scope > div:not(:first-child)'); | ||
const numCards = cards.length; | ||
cardsWrapper.setAttribute('aria-label', `${numCards} cards in this section`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as below: do these need to be authorable? What about localization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do a fast follow
firstChild.classList.add('center-title'); | ||
const header = firstChild.querySelector('h1, h2, h3'); | ||
header.setAttribute('aria-label', `${header.textContent.trim()} cards`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as below: do these need to be authorable? What about localization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do a fast follow
Describe your specific features or fixes:
Authoring Example: milo-discover-more-cards.docx
Resolves: MWPW-166954

Test URLs: