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

Adding suggestion for object tag #247

Merged
merged 1 commit into from
Apr 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions config/tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@
'resources' => ['WCAG Standard: <a href="http://www.w3.org/TR/UNDERSTANDING-WCAG20/media-equiv.html">1.2</a>',],
'example' => '',
],
[
'name' => 'objectTagDetected',
'title' => 'Multimedia may require plugins to display properly.',
'desc' => 'Multimedia embedded using the "Object" tag may require the user to install a plugin for their web browser. This can create support and access issues for some users. Additionally, users on mobile devices may not be able to view the multimedia content at all. Consider using an alternative format that the user\'s browser can display natively.',
'resources' => [],
'example' => '',
],
[
'name' => 'headersHaveText',
'title' => 'Headings should contain text',
Expand Down
17 changes: 17 additions & 0 deletions lib/quail/quail/common/accessibility_tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -4821,6 +4821,23 @@ class objectShouldHaveLongDescription extends quailTagTest
var $tag = 'object';
}

/**
* Objects may not be properly viewable on mobile devices.
* This test adds a suggestion to consider mobile users when relying on objects for multimedia content.
*/
class objectTagDetected extends quailTagTest
{
/**
* @var int $default_severity The default severity code for this test.
*/
var $default_severity = QUAIL_TEST_SUGGESTION;

/**
* @var string $tag The tag this test will fire on
*/
var $tag = 'object';
}

/**
* Text equivalents for object should be updated if object changes.
* If an object element contains a codebase attribute then the codebase attribute value must be null or whitespace.
Expand Down
1 change: 1 addition & 0 deletions lib/quail/quail/guidelines/section508.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class Section508Guideline extends quailGuideline{
'noHeadings',
// 'appletsDoNotFlicker',
// 'objectDoesNotFlicker',
'objectTagDetected',
// 'scriptsDoNotFlicker',
// 'scriptInBodyMustHaveNoscript',
// 'appletContainsTextEquivalentInAlt',
Expand Down
1 change: 1 addition & 0 deletions lib/quail/quail/guidelines/translations/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"skipToContentLinkProvided","A ""skip to content"" link should exist as one of the first links on the page","<p>A link reading ""skip to content,"" or using similar wording, should exist at the beginning of the page to help non-sighted or keyboard-using users jump directly to page content.</p>","2"
"doctypeProvided","The document should contain a valid ""doctype"" declaration","<p>Each document should contain a valid doctype declaration..</p><h4>Example</h4><h5>Wrong</h5><p><code>&lt;html&gt;</code></p><h5>Right</h5><p><code>&lt;!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Strict//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd""&gt;&lt;html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"" lang=""en""&gt;</code></p>","1"
"objectDoesNotFlicker","Objects do not flicker","<p>The content within an <code>object</code> tag should not flicker.</p>","3"
"objectTagDetected","Multimedia may require plugins to display properly.","<p>Multimedia embedded using the ""Object"" tag may require the user to install a plugin for their web browser. This can create support and access issues for some users. Additionally, users on mobile devices may not be able to view the multimedia content at all. Consider using an alternative format that the user's browser can display natively.</p>","3"
"framesHaveATitle","All ""frame"" elements should have a ""title"" attribute","<p>Each <code>frame</code> elements should have a ""title"" attribute.</p><h4>Example</h4><h5>Wrong</h5><p><code>&lt;frame src=""navigation.html""&gt;&lt;/frame&gt;</code></p><h5>Right</h5><p><code>&lt;frame src=""navigation.html"" title=""The site navigation""&gt;&lt;/frame&gt;</code></p>","1"
"frameTitlesDescribeFunction","All ""frame"" elemetns should have a ""title"" attribute that describes the purpose of the frame","<p>Each <code>frame</code> elements should have a ""title"" attribute which describes the purpose or function of the frame.</p><h4>Example</h4><h5>Wrong</h5><p><code>&lt;frame src=""navigation.html""&gt;&lt;/frame&gt;</code></p><h5>Right</h5><p><code>&lt;frame src=""navigation.html"" title=""The site navigation""&gt;&lt;/frame&gt;</code></p>","3"
"frameSrcIsAccessible","The source for each frame is accessible content.","<p>Each frame should contain accessible content, and contain content accessible to <a href='http://en.wikipedia.org/wiki/Screen_reader'>screen readers</a>, like HTML as opposed to an image.</p>","3"
Expand Down
1 change: 1 addition & 0 deletions lib/quail/quail/guidelines/wcag2aaa.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Wcag2aaaGuideline extends quailGuideline
'aLinksToSoundFilesNeedTranscripts',
'aLinksToMultiMediaRequireTranscript',
'objectShouldHaveLongDescription',
'objectTagDetected',
// 'inputTextHasLabel',
'pNotUsedAsHeader',
// 'selectHasAssociatedLabel',
Expand Down