ADA / Section 508 Scan
-
We are in the process of running ADA/Section 508 compliance software on the site, and we are noticing that our report indicates a problem with the mdocs-modals.php file functions that are being loaded in the page (the page above is just a sample).
If I understand this correctly, the functions file loads in the page so that if one of the “Displayed File Information” checkboxes are selected in the settings page, the appropriate modal window will pop up and display information (whatever it is).
The problem is that the software we are using to do the ADA/Section 508 compliance scan displays an error (this happens on several pages, and this is only one example):
The ARIA-LABELLEDBY attribute references a non-existent element ID.
One of these IDs wasn’t found: mdocs-ratings
Line 413 WCAG 2.0 A F68 Section 508 (2017) A F68 Section 508 (2000) 1194.22 (n)Is there a way to program around this, so that if the option isn’t selected in the settings, that a particular modal function won’t load on the page at all? That would eliminate the error in finding code that has no values.
Please let me know if you have any questions about my ramblings. Thank you for your assistance!
The page I need help with: [log in to see the link]
-
I know exactly what you are doing, in Canada we call it AODA compliance. I have to admit I have done no compliance testing for this plugin so there probably are my errors.
I can fix the modal errors, but it would be nice to get a list of all errors so I could fix them all.
If you can could you post all your results.
Hopefully you’ll be able to get to this report; let me know if you can’t. This is my scan report out of a tool called SortSite.
no the file is protected.
Sorry about that. I was afraid that would be the case. I’ve changed the settings, so you should be able to get it now.
Thank you!what level of compliance are you required to meet?
i’ve altered my mdocs-modal.php file, try updating the file on your system and run your test again. I think this should resolve some of the issue:
<?php function mdocs_load_modals() { load_preview_modal(); load_ratings_modal(); load_add_update_modal(); load_share_modal(); load_description_modal(); load_versions_modal(); load_batch_edit_modal(); load_batch_move_modal(); load_batch_delete_modal(); } function load_add_update_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-add-update" tabindex="-1" role="dialog" aria-labelledby="mdocs-add-update-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-add-update-body" id="mdocs-add-update-aria"> <?php mdocs_uploader(); ?> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_description_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-description-preview" tabindex="-1" role="dialog" aria-labelledby="mdocs-description-preview-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-description-preview-body mdocs-modal-body mdocs-post" id="mdocs-description-preview-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_preview_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-file-preview" tabindex="-1" role="dialog" aria-labelledby="mdocs-file-preview-aria" aria-hidden="true" > <div class="modal-dialog modal-lg" style="height: 100% !important;"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal" id="mdocs-file-preview"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-file-preview-body mdocs-modal-body" id="mdocs-file-preview-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_ratings_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-rating" tabindex="-1" role="dialog" aria-labelledby="mdocs-ratings-aria" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-ratings-body mdocs-modal-body" id="mdocs-ratings-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_share_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-share" tabindex="-1" role="dialog" aria-labelledby="mdocs-share-aria" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-share-body mdocs-modal-body" id="mdocs-share-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_batch_edit_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-batch-edit" tabindex="-1" role="dialog" aria-labelledby="mdocs-batch-edit-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-batch-edit-body mdocs-batch-body mdocs-modal-body" id="mdocs-batch-edit-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" onclick="mdocs_batch_edit_save();"><?php _e('Save', 'memphis-documents-library'); ?></button> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_batch_move_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-batch-move" tabindex="-1" role="dialog" aria-labelledby="mdocs-batch-move-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-batch-move-body mdocs-batch-body mdocs-modal-body" id="mdocs-batch-move-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" onclick="mdocs_batch_move_save();"><?php _e('Move', 'memphis-documents-library'); ?></button> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_batch_delete_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-batch-delete" tabindex="-1" role="dialog" aria-labelledby="mdocs-batch-delete-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-batch-delete-body mdocs-batch-body mdocs-modal-body" id="mdocs-batch-delete-aria"></div> <div id="mdocs-batch-delete-test"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" onclick="mdocs_batch_delete_save();"><?php _e('Delete', 'memphis-documents-library'); ?></button> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_versions_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-versions" tabindex="-1" role="dialog" aria-labelledby="mdocs-versions-aria" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-versions-body mdocs-modal-body" id="mdocs-versions-aria"></div> <div id="mdocs-versions-test"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } ?>
Right now, we’re just interested in Section 508 compliance. That may change later, of course.
I’ve posted the modified file and re-scanned the site. I’ve got the new report posted for you at the same link. (Just BTW, your plugin makes this *SO* much easier!)
Im glad it makes life easier for you ??
Here is another modal file to try:
<?php function mdocs_load_modals() { global $post; if (has_shortcode( $post->post_content, 'mdocs' ) && $post->post_type != 'mdocs-posts') { load_preview_modal(); load_ratings_modal(); load_add_update_modal(); load_share_modal(); load_description_modal(); load_versions_modal(); load_batch_edit_modal(); load_batch_move_modal(); load_batch_delete_modal(); } } function load_add_update_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-add-update" tabindex="-1" role="dialog" aria-labelledby="mdocs-add-update-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-add-update-body" id="mdocs-add-update-aria"> <?php mdocs_uploader(); ?> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_description_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-description-preview" tabindex="-1" role="dialog" aria-labelledby="mdocs-description-preview-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <h4 id="mdocs-description-preview-aria""></h4> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-description-preview-body mdocs-modal-body mdocs-post"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_preview_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-file-preview" tabindex="-1" role="dialog" aria-labelledby="mdocs-file-preview-aria" aria-hidden="true" > <div class="modal-dialog modal-lg" style="height: 100% !important;"> <div class="modal-content"> <div class="modal-body"> <h4 id="mdocs-file-preview-aria"></h4> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-file-preview-body mdocs-modal-body"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_ratings_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-rating" tabindex="-1" role="dialog" aria-labelledby="mdocs-ratings-aria" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <h4 id="mdocs-ratings-aria"></h4> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-ratings-body mdocs-modal-body" ></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_share_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-share" tabindex="-1" role="dialog" aria-labelledby="mdocs-share-aria" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <h4 id="mdocs-share-aria"></h4> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-share-body mdocs-modal-body" ></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_batch_edit_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-batch-edit" tabindex="-1" role="dialog" aria-labelledby="mdocs-batch-edit-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-batch-edit-body mdocs-batch-body mdocs-modal-body" id="mdocs-batch-edit-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" onclick="mdocs_batch_edit_save();"><?php _e('Save', 'memphis-documents-library'); ?></button> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_batch_move_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-batch-move" tabindex="-1" role="dialog" aria-labelledby="mdocs-batch-move-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-batch-move-body mdocs-batch-body mdocs-modal-body" id="mdocs-batch-move-aria"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" onclick="mdocs_batch_move_save();"><?php _e('Move', 'memphis-documents-library'); ?></button> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_batch_delete_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-batch-delete" tabindex="-1" role="dialog" aria-labelledby="mdocs-batch-delete-aria" aria-hidden="true"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-batch-delete-body mdocs-batch-body mdocs-modal-body" id="mdocs-batch-delete-aria"></div> <div id="mdocs-batch-delete-test"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" onclick="mdocs_batch_delete_save();"><?php _e('Delete', 'memphis-documents-library'); ?></button> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } function load_versions_modal() { ?> <div class="modal fade mdocs-modal" id="mdocs-versions" tabindex="-1" role="dialog" aria-labelledby="mdocs-versions-aria" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-body"> <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only"><?php _e('Close','memphis-documents-library'); ?></span></button> <div class="mdocs-versions-body mdocs-modal-body" id="mdocs-versions-aria"></div> <div id="mdocs-versions-test"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal"><?php _e('Close','memphis-documents-library'); ?></button> </div> </div> </div> </div> <?php } ?>
how are the issue now, I have made some more modifications to try and resolve this issue.
I’ve loaded the latest update and rerun a scan (the report has been updated on the site). It appears that there were more issues introduced in the latest scan report.
If I put in the code changes you provided previously for mdocs-modals.php, the report comes out a little better, but the upload and manage file links in the admin area break.
yeah the reason for the better results is that the modals are not loading, but by not loading it breaks the way mdocs works.
I think next version I will try to remove the aria reference and see if that works.
Sounds good. I’ll wait for the changes.
Can you give me a status report on the changes I’ve made. Are they working or not?
- The topic ‘ADA / Section 508 Scan’ is closed to new replies.