Problem/Motivation
Many clients, particularly administrations are paying attentions to following standards and may impose their site to be W3C compliant.
The purpose of this META is to determine whether Drupal Core should follow W3C and if yes, to list initiatives, issues and tools to make it happen.
Remaining tasks
- Define if Drupal Core should follow W3C standards.
- Identify helper tools that might help finding misvalidation.
- Define where child-issues should be open per point / per page or per type.
- Characterize where Drupal does comply W3C and open child-issues.
- Fix child-issues.
Proposed resolution
As an helper tool, I have started to port W3C Validator module. You can use the 8.x-dev version to find out that Drupal Core does not validate W3C standards yet.
Currently, it does only :
- validate websites accessible through the internet
- validates node pages and admin pages (either as anonymous or registered user)
- display nymber of errors / warnings
- display what's wrong
User interface changes
None.
API changes
None.
Beta phase evaluation
Issue category | Bug because it does not seems expected to not validate W3C test. |
---|---|
Issue priority | Major because this seems serious to me but does not break any functionnality. |
Unfrozen changes | Unfrozen because it only changes output markup not APIs |
Prioritized changes | The main goal of this issue is accessibility and standard respects. |
Disruption | None. |
Comment | File | Size | Author |
---|---|---|---|
#12 | screen_validator.png | 281.75 KB | Dom. |
#4 | W3C Validation Report Drupal 8.x-dev.zip | 108.74 KB | Dom. |
Comments
Comment #1
Dom. CreditAttribution: Dom. commentedComment #2
Dom. CreditAttribution: Dom. commentedComment #3
Dom. CreditAttribution: Dom. commentedComment #4
Dom. CreditAttribution: Dom. commentedLinking a preliminary result report made from the view of an admin user.
Comment #5
Cliff CreditAttribution: Cliff as a volunteer commentedDom., do you know about the Drupal Accessibility Group? Ever since Drupal 6, we have been working to help developers make Drupal conform with the W3C's Authoring Tool Accessibility Guidelines (ATAG). To conform with ATAG 2.0 would mean that:
The scenario I've described above is not necessarily the perfect result, but I hope you can see the general point. There is usually no way a content management system can tell why an image is being added, so it can't tell whether the alt attribute should be empty or populated. And even if the alt attribute is populated, the system can't be sure the person uploading the image entered appropriate wording.
But the system can help people understand that every image must have an alt attribute and what they should consider when they decide what wording will go into that attribute. So it can't ensure that a website built with Drupal is accessible, but it can ensure that people who use Drupal to build websites know what they can do to make their websites accessible.
We're working now to ensure that Drupal 8 conforms with ATAG as well as it can. And I must admit that I've been almost completely absent since the release of Drupal 7, but I'm returning. For the latest word on accessibility and Drupal, contact Mike Gifford (mgifford), our accessibility maintainer for Drupal 8, or Jesse Beach (jessebeach), another of the organizers of the Accessibility Group.
I am very glad to see that you are interested in making Drupal more accessible, Dom. You might also review the issues that are blocking the release of Drupal 8 to see which ones relate to accessibility and whether you can help with those particular issues. That's a place to make a huge difference.
Welcome!
Comment #6
Cliff CreditAttribution: Cliff as a volunteer commentedDom., it looks like you've used an automated report of some sort to identify errors in Drupal core. Unfortunately, not all errors can be caught in an automated check, and not all errors reported by an automated check are necessarily errors.
We do have an Accessibility Team that reviews patches and other code that touch accessibility in some way. I've added two tags to this issue:
For better response to issues you create that are related to accessibility, please be sure to add these tags.
I'm glad you're eager to help us make Drupal an even more accessible development platform. Thanks for contributing!
Comment #7
Dom. CreditAttribution: Dom. commented@Cliff: Thanks for this long post of explanations. I did join the Accessibility group to keep informed.
Also, regarding #6, I made the tests using a custom module that validates every page using the W3C validator (https://validator.w3.org/). This is needed as a requirment for some government websites.
Comment #8
mgiffordJust quickly wanted to add that the "needs accessibility review" tag isn't reviewed as much as the "accessibility" tag.
Also wanted to add that the W3C validator has flaws in it like all accessibility testers. Automated testing only goes so far and each has it's limitations & biases. They test for the low hanging fruit of WCAG for the most part. Things like alt tags which are easy to programmaticly determine.
I'm really happy though that you've set up https://www.drupal.org/project/w3c_validator though. Excellent job.
Comment #9
Dom. CreditAttribution: Dom. commented@mgifford for #8 : I did w3c_validator version D8 for drupaldevdays Montpellier 2015 as part of both "Service Authenticator" and "Session leaks" critical issues back then (for testing and POC) and for to generate this META story report. I know this module is not (yet) perfect, but at least it made the job quickly enough to start the work on those issues during devdays.
Comment #10
mgiffordThanks.. Hopefully we'll get you some help to fix up the module.
Comment #11
catchComment #12
Dom. CreditAttribution: Dom. commentedI finished a first 8.x-1.0 version which allows to validate the page to W3C even if the site is offline, which makes it easy to use it on a dev platform.
Anyway, it helps me found some new errors/warnings as per how D8 ships. To reproduce, enable W3C Validator and validate your pages at : /admin/reports/w3c_validator
Comment #13
mgiffordThanks @Dom. not sure how many of those are accessibility issues vs best practices.
Certainly duplicating html5 & aria isn't good. Would be worth setting up a new issue to clean up the html in 8.1
Comment #14
BarisW CreditAttribution: BarisW as a volunteer and at LimoenGroen commentedI added a follow-up to remove unneeded
role="navigation"
attributes: #2655764: Remove unneeded role="navigation" attribute from <nav> elementsComment #15
BarisW CreditAttribution: BarisW as a volunteer and at LimoenGroen commentedAnd another one for
<button role="button">
: #2655772: Remove unneeded role="button" attribute from <button> elementsComment #16
BarisW CreditAttribution: BarisW as a volunteer and at LimoenGroen commentedAnd the last one: #2655794: Remove redundant WAI-ARIA role attributes from <main>, <nav>, <aside>, <header>, and <footer> elements
Comment #25
Dom. CreditAttribution: Dom. commentedW3C Validator module is available for 9.x and can now use local validator.
Adding a child issue: #3186821: Attribute “hreflang” not allowed on element “span” and “button” at this point
Comment #26
mgifford@Dom. what does the W3C Validator provide that tools like HTMLaw? - https://www.drupal.org/project/htmlawed
Comment #27
Dom. CreditAttribution: Dom. commentedHi @mgifford. I am sorry, I am not a native english, and I do not understand your question. Is your question about the difference between this module and htmlawed ?
W3C Validator module simply let's you validate any page (not juste a node) to w3cvalidator, just as you would manually to at this adresse : https://validator.w3.org/
It does not fix anything though.
On the other hand, htmlawed module seems to only work on text fields (since it is a text format filter) but corrects the faulty HTML.
That is if I understood properly the htmlawed module description because I never actually used it.
Comment #28
mgiffordOk, this is fine @Dom. It sounds like ultimately they are are accomplishing similar things. Both are aspects of accessibility.
It would be great if we were scanning our sandbox environments to catch bugs that the validator finds.