a11y PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar drmenzelit
drmenzelit
10 Jul 2023

Pull Request for Issue # .
If "Show Page Heading" in a single contact is set to "Hide", you will get errors with the accessibility checker, because the headings are skipping a level.

Summary of Changes

Added a new htag2 variable to replace the hard-coded <h3> elements.

Testing Instructions

Create a contact and a menu item for it.
Activate the Accessibility Checker Plugin in the frontend and check the output with and without Page Heading.

Actual result BEFORE applying this Pull Request

Without Page Heading
2023-07-10 15_58_10-Contact – Mozilla Firefox

Expected result AFTER applying this Pull Request

With Page Heading
2023-07-10 15_58_38-Contact – Mozilla Firefox

Without Page Heading
2023-07-10 16_07_35-Contact – Mozilla Firefox

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 10 Jul 2023
Category Front End com_contact
avatar drmenzelit drmenzelit - open - 10 Jul 2023
avatar drmenzelit drmenzelit - change - 10 Jul 2023
Status New Pending
avatar drmenzelit drmenzelit - change - 10 Jul 2023
Title
[5.X] Corrected headings ordering in contact
[5.x] Corrected headings ordering in contact
avatar drmenzelit drmenzelit - edited - 10 Jul 2023
avatar ChristineWk ChristineWk - test_item - 11 Jul 2023 - Tested successfully
avatar ChristineWk
ChristineWk - comment - 11 Jul 2023

I have tested this item successfully on 3ddca9a


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41133.

avatar Quy
Quy - comment - 19 Jul 2023

Links should be H2.

Before PR:
41133-before

After PR:
41133-after

Maybe rewrite the following:

<<?php echo $htag2; ?>><?php echo Text::_('COM_CONTACT_DETAILS'); ?></<?php echo $htag2; ?>>

to the following for easier code reading??:

<?php echo '<' . $htag2 . '>' . Text::_('COM_CONTACT_DETAILS') . '</' . $htag2 . '>'; ?>

avatar drmenzelit drmenzelit - change - 20 Jul 2023
Labels Added: a11y PR-5.0-dev
avatar drmenzelit
drmenzelit - comment - 20 Jul 2023

Good spotted @Quy, thank you!
I moved the title to the default.php to be consistent with the other titles

avatar Quy
Quy - comment - 20 Jul 2023

Under Contact Display Options, set Name to Hide.

41133-name

avatar drmenzelit
drmenzelit - comment - 20 Jul 2023

Hmm... I will have to check the logic again ...

avatar drmenzelit
drmenzelit - comment - 21 Jul 2023

I hope I got all combinations correctly:
Show page heading & Show name -> Page Heading = h1 | Name = h2 | Others = h3
Show page heading & Hide name -> Page Heading = h1 | Others = h2
Hide page heading & Show name -> Name = h1 | Others = h2
Hide page heading & Hide name -> Others = h2 and you get an error "missing h1", that is the same we have in a category blog

avatar Quy
Quy - comment - 21 Jul 2023

Hide page heading & Hide name -> Others = h2 and you get an error "missing h1", that is the same we have in a category blog

Beyond the scope of this PR? If yes, I will mark it successful.

avatar drmenzelit
drmenzelit - comment - 22 Jul 2023

Beyond the scope of this PR? If yes, I will mark it successful.

Yes, and I don't know, if there is a solution for that.

avatar Quy Quy - test_item - 24 Jul 2023 - Tested successfully
avatar Quy
Quy - comment - 24 Jul 2023

I have tested this item successfully on 26ff6f7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41133.

avatar simbus82
simbus82 - comment - 28 Jul 2023

But if i have 3 Authors and i enable the Page Heading AFTER applying this Pull Request, now i have 3 pages with the same H1, and this is wrong.
For me Page Heading in this case is only a visual element, nothing to do with the semantic of page, in an author's page the H1 must be always the "The Author" (that is unique)

avatar drmenzelit
drmenzelit - comment - 28 Jul 2023

You have the same behaviour without the PR, because the page heading comes from the menu. And you have the same behaviour on a blog layout. I'm not saying it is correct or not.

avatar rachelwalraven rachelwalraven - test_item - 26 Aug 2023 - Tested successfully
avatar rachelwalraven
rachelwalraven - comment - 26 Aug 2023

I have tested this item ✅ successfully on 26ff6f7

On Joomla 5.0 with PHP 8.1.22


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41133.

avatar HLeithner HLeithner - change - 26 Aug 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-08-26 13:51:09
Closed_By HLeithner
avatar HLeithner HLeithner - close - 26 Aug 2023
avatar HLeithner HLeithner - merge - 26 Aug 2023
avatar HLeithner
HLeithner - comment - 26 Aug 2023

thanks

Add a Comment

Login with GitHub to post a comment