Skip to content

feat(client): remove the Media component for our Card component - #49278

Merged
Sembauke merged 19 commits into
freeCodeCamp:mainfrom
Sboonny:feat/swap-media-with-the-card
Feb 28, 2023
Merged

Sembauke merged 19 commits into
freeCodeCamp:mainfrom
Sboonny:feat/swap-media-with-the-card

Conversation

@Sboonny

@Sboonny Sboonny commented Feb 7, 2023 •

Copy link
Copy Markdown
Member

Checklist:

Closes #49277
Clear the confusing alt described in this issue #49144

@Sboonny Sboonny added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 7, 2023
@Sboonny
Sboonny requested a review from a team February 7, 2023 11:48
@github-actions github-actions Bot added the platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. label Feb 7, 2023
@ghost

ghost commented Feb 7, 2023 •

Copy link
Copy Markdown

👀 Review this PR in a CodeSee Review Map

View the CodeSee Map of this change

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@Sboonny
Sboonny marked this pull request as draft February 7, 2023 12:37
@Sboonny Sboonny removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 7, 2023
@github-actions github-actions Bot added the scope: i18n language translation/internationalization. Often combined with language type label label Feb 8, 2023
@Sboonny
Sboonny marked this pull request as ready for review February 8, 2023 17:28
@Sboonny Sboonny added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 8, 2023
@Sboonny Sboonny assigned Sboonny and unassigned Sboonny Feb 8, 2023
@bbsmooth

Copy link
Copy Markdown
Contributor

Hey @Sbooney, nice job on making the link spread over the entire card. That is exactly how you create a clickable card accessibly. I do think we should make a few changes to the underlying HTML though.

  • I think the h3 should be the first element in the card. I know we are doing an empty alt attribute (at least for now), so screen reader users won't even be aware of the image, but semantically, the image is content for the card and thus it should probably come after the heading. Feel free to use CSS to reorder the heading and image for mobile view (this is one of those instances where it is OK to do that).

  • We should wrap the a element around the heading text (it would be nested inside of the h3) instead of creating a separate link with sr-only text. I think we have some potential confusion of having a link with only sr-only text for people who use a screen reader and can see the page (not everyone who uses a screen reader is blind). Besides, the heading text already provides the perfect text for the link so we can do away with some duplication.

I also think we might want to put some sort of border around each card just to make it a little clearer that it is a card that can be clicked on anywhere to go to the project.

@Sboonny Sboonny removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 14, 2023
@Sboonny
Sboonny marked this pull request as draft February 14, 2023 06:23
@Sboonny
Sboonny marked this pull request as ready for review February 16, 2023 10:40
@Sboonny Sboonny added the status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. label Feb 16, 2023
@naomi-lgbt naomi-lgbt added status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Feb 18, 2023

@naomi-lgbt naomi-lgbt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

image

This is super cool.

@naomi-lgbt
naomi-lgbt requested a review from bbsmooth February 18, 2023 17:19
@bbsmooth

bbsmooth commented Feb 18, 2023 •

Copy link
Copy Markdown
Contributor

Agreed, definitely like the looks of this. But I found a few things that we might want to touch up.

fcc-profile-card

  • Can the h3 take up all available inline space?
  • If the h3 is long enough to line wrap then the keyboard focus indicator does not look very good.
  • The description text is being cut-off arbitrarily in the middle of a word.

The focus indicator issue isn't essential if it's too hard to fix. One thing we could do is make the link a block instead of inline and then the outline will enclose the entire heading as one box instead of trying to add an outline to each individual line.

@Sboonny
Sboonny marked this pull request as draft February 19, 2023 04:19
@Sboonny

Sboonny commented Feb 19, 2023 •

Copy link
Copy Markdown
Member Author

chrome has a different way of setting the outline than FireFox 🤣, display block worked 👍

@Sboonny
Sboonny marked this pull request as ready for review February 19, 2023 06:47
@Sboonny
Sboonny marked this pull request as draft February 21, 2023 10:29
@Sboonny
Sboonny marked this pull request as ready for review February 21, 2023 11:19
@Sboonny

This comment was marked as outdated.

@Sembauke

Copy link
Copy Markdown
Member

Hey @Sboonny,

This is already looking better. Do you mind if I make some changes?

@Sboonny

Sboonny commented Feb 21, 2023

Copy link
Copy Markdown
Member Author

nope, go ahead 👍

@Sembauke
Sembauke marked this pull request as draft February 21, 2023 15:55
@bbsmooth

Copy link
Copy Markdown
Contributor

If we are not going to use the h3 as a link and instead have a separate link to open the item, then the link text will need to be more specific. Perhaps something like "Open item [title of item]" where the text in the brackets is sr-only text. I'm just not sure "Follow link [title of item]" makes as much sense? Regardless, however you want to word it, but the title of the portfolio item should be at the end of the link text as sr-only text.

@Sembauke

Copy link
Copy Markdown
Member

@Sboonny Feel free to fix it.

@Sboonny Sboonny removed the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 22, 2023
@Sboonny Sboonny self-assigned this Feb 22, 2023
@Sboonny Sboonny removed their assignment Feb 27, 2023
@Sboonny
Sboonny marked this pull request as ready for review February 27, 2023 12:18
@Sboonny Sboonny added the status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending. label Feb 27, 2023
@Sembauke
Sembauke merged commit 6c4c360 into freeCodeCamp:main Feb 28, 2023
@Sembauke

Copy link
Copy Markdown
Member

Thanks for making this, I like collaborating with you :)

@Sboonny
Sboonny deleted the feat/swap-media-with-the-card branch February 28, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. scope: i18n language translation/internationalization. Often combined with language type label status: waiting review To be applied to PR's that are ready for QA, especially when additional review is pending.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the Media component to our news card component

4 participants