Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagebreak: make Article Index always accessible (also with title hidden and page-header shown, avoid h1 > h3) #17670

Closed

Conversation

LivioCavallo
Copy link
Contributor

@LivioCavallo LivioCavallo commented Aug 22, 2017

Summary of Changes

In J! 3.7.5 Article Index Heading can be shown by Pagebreak plugin at top of article T.O.C.; it's in a <h3> element.
To avoid an accessibility error (<h3> follows <h1>) in some circumstancies (when article title <h2> is hidden and page header <h1> is shown), let's put Article Index Heading in <strong> instead of <h3>.

Testing Instructions

Create and publish an article; create a menuitem to that single article.
Set Menuitem 'Page Display' settings to 'Show Page Heading' and Options to hide Title.

Expected result

The page is accessible (https://achecker.ca/checker/index.php)

Actual result

The page is not accessible: Header nesting - header following <h1> is incorrect (Modify the header levels so only an <h1> or <h2> follows <h1>).

Notes

Usual headings flow is relative to the article; article index are "aside" informations, "nav"igation informations that are related to article but not constitute article's structure.
Changing <h3> to <strong> should not be a big impact here.

@brianteeman
Copy link
Contributor

I am not in favour of this PR as it will change the output of a users site and they have no easy way to see how to change it. I am not convinced it is a genuine a11y error and it is something that a siteowner should change if they so desire.

There are so many places we can improve the a11y that do not effect the template we should concentrate on them eg in the admin

@LivioCavallo
Copy link
Contributor Author

Three a11y validators I use detect this as an error; I think it's a genuine accessibility error.
Surely there are other pieces of code in J! to improve a11y but I never had to make the backend a11y validable; on the contrary I had to make J! frontend validable some times, so now I share some of my little fixes, if it can be useful.

@LivioCavallo
Copy link
Contributor Author

An alternative would be to emit the Page_Title <h2> anyway, eventually hidden (just as I suggested in PR #17686), so to grant this sequence: Page_header <h1> -> (eventually hidden) Page_Title <h2> -> eventually followed by Article Index <h3> .

@ghost
Copy link

ghost commented Nov 1, 2017

@brianteeman is the Suggestion above a Solution?


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

@brianteeman
Copy link
Contributor

No not really.

@LivioCavallo
Copy link
Contributor Author

The problem is: such a page does not validate.
I propose two ways to SOLVE it:

Please, comment on which one is better or why they are not acceptable solutions (the fact that there are many other problems is not an argument, in my humble opinion).

@brianteeman
Copy link
Contributor

I am not in favour of this PR as it will change the output of a users site and they have no easy way to see how to change it

I dont think this can ever be "fixed" in the core as it is very site configuration specific

@ghost
Copy link

ghost commented Nov 5, 2017

Status is set on "Needs Review".

@brianteeman
Copy link
Contributor

PS I have been educated now that it is an a11y issue. I still have concerns about changing it as we are also effecting the display of a users web site

@ReLater
Copy link
Contributor

ReLater commented Apr 19, 2018

Maybe you like this pr that uses override possibilllity of plugins:
#20202

@ReLater
Copy link
Contributor

ReLater commented Apr 25, 2018

@LivioCavallo
We just need one more test for pr #20202 .
If it gets merged users and template creators have the possibility to use any HTML tag they want in a template override for the article TOC or use conditions or.... And it's B\C.

@Quy
Copy link
Contributor

Quy commented Apr 26, 2018

Please close per Brian's comment/concern.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/17670

@ghost
Copy link

ghost commented Apr 26, 2018

closed as stated above.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants