Site Title: Fix logic for 'aria-current' attribute#68909
Conversation
…e on the posts page
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @[email protected]. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @bschneidewind! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
Hi @bschneidewind, Can you please add the Thank You, |
|
The Home Link block has a different conditional statement: gutenberg/packages/block-library/src/home-link/index.php Lines 142 to 149 in 6800a97 And neither block matches the condition in |
|
Thank you @sabernhardt - helped ID another edge case and reworked this code a bit! |
aria-current attribute
aria-current attribute
Test resultsYour homepage displays Your latest postsHome: Your homepage displays A static pageHomepage is selected in the option. Posts page is selected in the option. Homepage is selected in the option. Posts page is not selected. Homepage is not selected in the option. Posts page is selected. |
|
I am moving this to the 6.8 board because the original trac ticket is on the 6.8 milestone, labeled as an accessibility bug. |
Unlinked contributors: [email protected]. Co-authored-by: carolinan <[email protected]> Co-authored-by: joedolson <[email protected]> Co-authored-by: hbhalodia <[email protected]> Co-authored-by: sabernhardt <[email protected]> Co-authored-by: bschneidewind <[email protected]>
|
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: 9f8d16d. |
Unlinked contributors: [email protected]. Co-authored-by: carolinan <[email protected]> Co-authored-by: joedolson <[email protected]> Co-authored-by: hbhalodia <[email protected]> Co-authored-by: sabernhardt <[email protected]> Co-authored-by: bschneidewind <[email protected]>
What?
This updates the core/site-title block and the aria-current attribute. This should only be applied to the front page and prevents the aria-current being applied if a user has a separate front page from the posts page. (the posts page should not have an aria-current attribute applied to site title in these instances)
Why?
Resolves bug where a separate posts page has the site-title attribute applied to the site-title (should only be applied to the front page)
How?
Testing Instructions
Trac ticket: https://core.trac.wordpress.org/ticket/62874