[wp-trac] [WordPress Trac] #52224: RSS Widget: allow removing the feed icon link
WordPress Trac
noreply at wordpress.org
Mon Mar 22 18:30:07 UTC 2021
#52224: RSS Widget: allow removing the feed icon link
-------------------------+-----------------------------
Reporter: sabernhardt | Owner: sabernhardt
Type: enhancement | Status: accepted
Priority: normal | Milestone: Future Release
Component: Widgets | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses: accessibility
-------------------------+-----------------------------
Description changed by sabernhardt:
Old description:
> Removing the icon link can help fix at least these two bugs:
> 1. #47670: Icon links for multiple widgets have identical link text.
> 2. Hiding the icon without hiding/disabling the link creates an invisible
> link in themes such as Twenty Twenty-One.
>
> On #47670, one possible solution was to remove the first link for
> everyone, but that would break probably all
> [https://wpdirectory.net/search/01EV7ET91VB07W44351E5ET1K5 themes that
> float or hide the icon link] with either `.rsswidget:first-of-type` or
> `.rsswidget:first-child`.
>
> With a new filter, setting it to return false (or null) could solve both
> issues without breaking:
> `add_filter( 'rss_widget_feed_link', '__return_false' );`
> (Although, if a theme adds the filter and updates the styles accordingly,
> a child theme that replaces the parent stylesheet would likewise need
> updating to avoid any breakage.)
>
> Another, separate possibility I've considered is including a new widget
> checkbox option so individual site owners can remove that link and/or
> include a link to the feed at the bottom of the widget instead. Then they
> can quickly add the link back if the layout breaks in their theme. If
> adding an option for the link within the heading, I'd like that to be
> unchecked by default, at least for any newly-added widgets. Ideally the
> heading would not contain both links.
New description:
Removing the icon link can help fix at least these two bugs:
1. #47670: Icon links for multiple widgets have identical link text.
2. Hiding the icon without hiding/disabling the link creates an invisible
link in themes such as Twenty Twenty-One (#52880).
On #47670, one possible solution was to remove the first link for
everyone, but that would break probably all
[https://wpdirectory.net/search/01EV7ET91VB07W44351E5ET1K5 themes that
float or hide the icon link] with either `.rsswidget:first-of-type` or
`.rsswidget:first-child`.
With a new filter, setting it to return false (or null) could solve both
issues without breaking:
`add_filter( 'rss_widget_feed_link', '__return_false' );`
(Although, if a theme adds the filter and updates the styles accordingly,
a child theme that replaces the parent stylesheet would likewise need
updating to avoid any breakage.)
Another, separate possibility I've considered is including a new widget
checkbox option so individual site owners can remove that link and/or
include a link to the feed at the bottom of the widget instead. Then they
can quickly add the link back if the layout breaks in their theme. If
adding an option for the link within the heading, I'd like that to be
unchecked by default, at least for any newly-added widgets. Ideally the
heading would not contain both links.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52224#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list