Clickable featured images, new 16x9 image size, outline style button fix#304
Clickable featured images, new 16x9 image size, outline style button fix#304RachelRVasquez wants to merge 2 commits into
Conversation
…ges on grid view, make banners/featured images clickable on archives, fix outline style buttons
flintfromthebasement
left a comment
There was a problem hiding this comment.
PR: #304 — Clickable featured images, new 16x9 image size, outline style button fix
RachieVee → dev | 5 files, +16 -12
#304
Summary
Three independent improvements: a correct 16:9 image size addition, clickable archive thumbnails, and an outline button color fix. Ready to merge with one fix — the banner link in entry-header.php is missing guards present in the parallel content.php change.
Issues
-
Major
components/post/entry-header.php:20-22— The new<a>wrapping the banner image has two problems:-
No
is_single()guard.entry-header.phprenders on both archives and single post pages. On a single post,get_permalink()returns the current URL — a self-referential link with no visible label. -
No accessibility attributes on the link. The
<img>inside isalt=""+aria-hidden="true", so the<a>has no accessible name. Keyboard users will tab to an unlabeled empty link.
The parallel change in
content.phphandles both correctly — use it as the model:if ( ! is_single() ) { echo '<a href="' . esc_url( get_permalink() ) . '" tabindex="-1" aria-hidden="true">'; } // ... img tag ... if ( ! is_single() ) { echo '</a>'; }
-
-
Minor
src/scss/blocks/_blocks.scss:201-202— Removingborder-colorandcolorfrom.is-style-outlinefixes the color picker override, but sites where no custom button color has been set will see a visual change (border/text will fall back tocurrentColor/inherited text color instead of the theme's--wp--preset--color--buttons). This is correct behavior, but worth calling out explicitly in the changelog as a visual change for default-configured buttons.
Looks Good
content.phphandles the clickable thumbnail cleanly —tabindex="-1"andaria-hidden="true"on the link,is_single()guard, and the alt text lookup kept intact. Good pattern.memberlite-16x9(960×540, cropped center) is a sensible size for grid banners and consistent with the existing named-size convention.get_post_thumbnail_id()without explicit$post->IDis fine inside the Loop; the refactor is cleaner.
…ing and showing an 'unlabeled empty link' to screen reader users, letting the title permalink be the focus.
All Submissions:
Changes proposed in this Pull Request:
Other information:
Changelog entry