Skip to content

Instantly share code, notes, and snippets.

@adelevie
Last active August 29, 2015 14:02
Show Gist options
  • Save adelevie/dec4f35c992c6ff1014d to your computer and use it in GitHub Desktop.
Save adelevie/dec4f35c992c6ff1014d to your computer and use it in GitHub Desktop.

1.1 Keyboard Access

  • An interactive element or function cannot be accessed or activated by keyboard [21(a), B1]
  • A keyboard trap is found [21(a), B1]
  • Non-standard or alternative keyboard commands are required for access but are not documented [21(a), B1]
  • Information revealed by mouse over (TITLE) is not available to keyboard-only users (i.e., there is no equivalent screen text or visual context) [21(a), B1]
  • At any time, there is no visual indication of the current focus (loss of focus) [21(c), B2]
  • The visual focus appears on the wrong element [21(c), B2]
  • The visual focus does not remain within a modal dialog box until closed [21(c), B4]
  • The visual focus does not move to revealed content and no description of the content change is provided [31(a), 31(b), B4]
  • The tab order is not logical [31(a), 31(b), B3]

1.2.1 SW: All interactive elements

  • A user control does not have a descriptive and unique Name property [21(d), B16]
  • A user control has an incorrect Role and/or State [21(d), B16]
  • An interactive interface element that has multiple statuses does not indicate its current status [21(d), B6]
  • An input form (text field, checkbox, radio button, etc.) Name does not match its visual label or does not include complete instructions and cues [21(d), 21(l), B11]
  • An input form Role does not accurately reflect its function [21(d), 21(l), B11]
  • An input form State does not accurately reflect that it is selected or has focus [21(d), 21(l), B11]
  • An input text field has an incorrect Value. [21(f), 21(l), B11]

1.2.2 Web: Forms

  • A Web form field has no markup to associate it to its complete instructions and cues [22(n), B11]
  • If 'Label for' and 'ID' are used but are not valid HTML [22(n), B11]
  • Form instructions are revealed only by mouse over (TITLE) and are not available onscreen [22(n), B11]
  • An ARIA form's Name property does not contain complete instructions [22(n), B11]
  • An ARIA form's Role or State or Value property is not correct [22(n), B11]
  • A form control does not identify its purpose [22(n), B11]

1.2.3 Web: Links and User Controls

  • A link does not have a unique and meaningful description [31(a), 31(b), B16]
  • A scripted element does not have a unique and meaningful description [22(l), 31(a), 31(b), B16]

2.1 SW: Images

  • An image does not have an equivalent text description (Name), correct Role, or correct State [21(d), B7]
  • Any interface element that has multiple statuses does not indicate its current status [21(d), B6]
  • A data table's headers are not identified [21(d), B13]
  • A complex data table cell is not associated to its header(s) [21(d), B14]
  • An image has inconsistent meaning [21(e), B7]

2.2 Web: Images

  • A Web image does not have an ALT or TITLE or ARIA attribute [22(a), B7]
  • A meaningful image does not have an equivalent text description (purpose and function) [22(a), B7]
  • A decorative image does not have ALT=[22(a), B7]
  • An image that contains text does not have the same text in the ALT [22(a), B7]
  • A CAPTCHA image ALT does not describe its purpose [22(a), B7]
  • A multi-state component does not provide complete status information [31(a), 31(b), B6]
  • An image has inconsistent meaning [21(e), B7]

2.3 Video-only and Animation

  • In SW, an animation does not have an equivalent text or audio description [21(h), B19]
  • In Web, a video-only file does not have an equivalent text or audio description [22(a), 24(d), B19]

2.4 Web: Audio-only

  • An audio file does not have an equivalent text description/transcript [22(a), B18]

2.5 Web: Image Maps

  • A server side image map is found [22(e), 22(f), B26]

3.1 Color Dependence

  • In software, information is provided only by color [21(i), B8]
  • In Web, information is provided only by color [22(c), B8]

3.2 Color Contrast

  • The contrast ratio is less than 4.5:1 for content background and foreground colors [31(b), B9]

4 Flashing

  • The frequency of a flickering element cannot be determined programmatically [21(k), 22(j), B10]
  • The frequency of a flickering element is programmatically set at or above 3 Hz [21(k), 22(j), B10]

5 Page Titles

  • There is no meaningful page title in plain language [31(a), 31(b), B12]

6 Multimedia

  • Synchronized captions are not provided for multimedia [22(b1), 24(c), B20]
  • The provided captions for multimedia are not equivalent [22(b1), 24(c), B20]
  • Synchronized audio descriptions are not provided for multimedia [22(b2), 24(d), B21]
  • The provided audio descriptions are not equivalent [22(b2), 24(d), B21]

7 Time Outs

  • The application timed out without notification [22(p), B25]
  • The application's time out notification is displayed for less than 20 seconds [22(p), B25]
  • The application timed out without an option to request more time [22(p), B25]

8 SW: Built-in Accessibility Features

  • The application disrupted any of the OS Accessibility options (High Contrast, Sticky Keys, Sound Sentry and/or system text size (stand-alone software only)) [21(b), B28]
  • The application does not adopt the OS high contrast display settings [21(g), B28]
  • Text of application did not enlarge or became illegible when enlarged [21(g), B28]
  • The application did not adopt the OS high contrast colors, 21(g), and the application does not offer at least 4 color options [DHS-Specific: 21(j), no baseline]
  • Sticky Keys functionality was disrupted in the application [31(f), B28]
  • Sound Sentry functionality was disrupted by the application [31(c), B28]

9.1 Web: Language

  • The correct default language for the page is not programmatically set [31(a), 31(b), B17]
  • A passage (content, image descriptions, form labels etc.) that differs from the default language of the page is not programmatically identified correctly [31(a), 31(b), B17]

9.2 Web: Section Headings

  • Visually apparent headings are not programmatically identified [31(a), 31(b), B15]
  • Programmatically identified heading levels do not match the visual outline level [31(a), 31(b), B15]

10 Web: Data Tables

  • Any data table's row or column headers are not identified programmatically [22(g), B13]
  • An image of a data table is found [22(g), B13]
  • A complex data table's data cells are not associated with its headers programmatically [22(h), B14]
  • An image of a complex data table is found [22(h), B14]

11 Web: Style Sheet Dependence

  • The order of the content changed and is not logical [22(d), B22]
  • Relevant content or information from a meaningful image is not available [22(d), B22]
  • Any content overlaps or becomes illegible [22(d), B22]
  • Programming code or other confusing elements are revealed on the page [22(d), B22]

12 Web: Frames

  • A frame's Title or Name is non-descriptive [22(i), B23]
  • An iframe's Title or Name is non-descriptive [22(i), B23]

13 Web: Repetitive Content And Links

  • There is no method to skip repetitive content [22(o), B5]
  • The skip function's target is not located after the repetitive content [22(o), B5]
  • The skip function does not work properly [22(o), B5]
  • The relative order of repeated components is different from other pages [31(a), 31(b), B3]

14 Web: Required Plug-Ins

  • In a public site, the link to download a required plug-in is not provided [22(m), B27]
  • The plug-in required to view content is not compliant [21(a)-(l) as applicable, No baseline]

15 Web: Alternative (Accessible) Version

  • An alternative page does not contain equivalent information as the primary page [22(k), B24]
  • The primary site can be made compliant [22(k), No baseline]
{
"title": "DHS 508 Checklist",
"items": [
{
"title": "Interactive Interface Elements",
"items": [
{
"title": "1.1 Keyboard Access",
"items": [
"An interactive element or function cannot be accessed or activated by keyboard [21(a), B1]",
"A keyboard trap is found [21(a), B1]",
"Non-standard or alternative keyboard commands are required for access but are not documented [21(a), B1]",
"Information revealed by mouse over (TITLE) is not available to keyboard-only users (i.e., there is no equivalent screen text or visual context) [21(a), B1]",
"At any time, there is no visual indication of the current focus (loss of focus) [21(c), B2]",
"The visual focus appears on the wrong element [21(c), B2]",
"The visual focus does not remain within a modal dialog box until closed [21(c), B4]",
"The visual focus does not move to revealed content and no description of the content change is provided [31(a), 31(b), B4]",
"The tab order is not logical [31(a), 31(b), B3]"
]
},
{
"title": "1.2.1 SW: All interactive elements",
"items": [
"A user control does not have a descriptive and unique Name property [21(d), B16]",
"A user control has an incorrect Role and/or State [21(d), B16]",
"An interactive interface element that has multiple statuses does not indicate its current status [21(d), B6]",
"An input form (text field, checkbox, radio button, etc.) Name does not match its visual label or does not include complete instructions and cues [21(d), 21(l), B11]",
"An input form Role does not accurately reflect its function [21(d), 21(l), B11]",
"An input form State does not accurately reflect that it is selected or has focus [21(d), 21(l), B11]",
"An input text field has an incorrect Value. [21(f), 21(l), B11]"
]
},
{
"title": "1.2.2 Web: Forms",
"items": [
"A Web form field has no markup to associate it to its complete instructions and cues [22(n), B11]",
"If 'Label for' and 'ID' are used but are not valid HTML [22(n), B11]",
"Form instructions are revealed only by mouse over (TITLE) and are not available onscreen [22(n), B11]",
"An ARIA form's Name property does not contain complete instructions [22(n), B11]",
"An ARIA form's Role or State or Value property is not correct [22(n), B11]",
"A form control does not identify its purpose [22(n), B11]"
]
},
{
"title": "1.2.3 Web: Links and User Controls",
"items": [
"A link does not have a unique and meaningful description [31(a), 31(b), B16]",
"A scripted element does not have a unique and meaningful description [22(l), 31(a), 31(b), B16]"
]
}
]
},
{
"title": "Non-Text Interface Elements",
"items": [
{
"title": "2.1 SW: Images",
"items": [
"An image does not have an equivalent text description (Name), correct Role, or correct State [21(d), B7]",
"Any interface element that has multiple statuses does not indicate its current status [21(d), B6]",
"A data table's headers are not identified [21(d), B13]",
"A complex data table cell is not associated to its header(s) [21(d), B14]",
"An image has inconsistent meaning [21(e), B7]"
]
},
{
"title": "2.2 Web: Images",
"items": [
"A Web image does not have an ALT or TITLE or ARIA attribute [22(a), B7]",
"A meaningful image does not have an equivalent text description (purpose and function) [22(a), B7]",
"A decorative image does not have ALT=[22(a), B7]",
"An image that contains text does not have the same text in the ALT [22(a), B7]",
"A CAPTCHA image ALT does not describe its purpose [22(a), B7]",
"A multi-state component does not provide complete status information [31(a), 31(b), B6]",
"An image has inconsistent meaning [21(e), B7]"
]
},
{
"title": "2.3 Video-only and Animation",
"items": [
"In SW, an animation does not have an equivalent text or audio description [21(h), B19]",
"In Web, a video-only file does not have an equivalent text or audio description [22(a), 24(d), B19]"
]
},
{
"title": "2.4 Web: Audio-only",
"items": [
"An audio file does not have an equivalent text description/transcript [22(a), B18]"
]
},
{
"title": "2.5 Web: Image Maps",
"items": [
"A server side image map is found [22(e), 22(f), B26]"
]
}
]
},
{
"title": "3 Color and Contrast",
"items": [
{
"title": "3.1 Color Dependence",
"items": [
"In software, information is provided only by color [21(i), B8]",
"In Web, information is provided only by color [22(c), B8]"
]
},
{
"title": "3.2 Color Contrast",
"items": [
"The contrast ratio is less than 4.5:1 for content background and foreground colors [31(b), B9]"
]
}
]
},
{
"title": "4 Flashing",
"items": [
"The frequency of a flickering element cannot be determined programmatically [21(k), 22(j), B10]",
"The frequency of a flickering element is programmatically set at or above 3 Hz [21(k), 22(j), B10]"
]
},
{
"title": "5 Page Titles",
"items": [
"There is no meaningful page title in plain language [31(a), 31(b), B12]"
]
},
{
"title": "6 Multimedia",
"items": [
"Synchronized captions are not provided for multimedia [22(b1), 24(c), B20]",
"The provided captions for multimedia are not equivalent [22(b1), 24(c), B20]",
"Synchronized audio descriptions are not provided for multimedia [22(b2), 24(d), B21]",
"The provided audio descriptions are not equivalent [22(b2), 24(d), B21]"
]
},
{
"title": "7 Time Outs",
"items": [
"The application timed out without notification [22(p), B25]",
"The application's time out notification is displayed for less than 20 seconds [22(p), B25]",
"The application timed out without an option to request more time [22(p), B25]"
]
},
{
"title": "8 SW: Built-in Accessibility Features",
"items": [
"The application disrupted any of the OS Accessibility options (High Contrast, Sticky Keys, Sound Sentry and/or system text size (stand-alone software only)) [21(b), B28]",
"The application does not adopt the OS high contrast display settings [21(g), B28]",
"Text of application did not enlarge or became illegible when enlarged [21(g), B28]",
"The application did not adopt the OS high contrast colors, 21(g), and the application does not offer at least 4 color options [DHS-Specific: 21(j), no baseline]",
"Sticky Keys functionality was disrupted in the application [31(f), B28]",
"Sound Sentry functionality was disrupted by the application [31(c), B28]"
]
},
{
"title": "9 Web: Text Properties",
"items": [
{
"title": "9.1 Web: Language",
"items": [
"The correct default language for the page is not programmatically set [31(a), 31(b), B17]",
"A passage (content, image descriptions, form labels etc.) that differs from the default language of the page is not programmatically identified correctly [31(a), 31(b), B17]"
]
},
{
"title": "9.2 Web: Section Headings",
"items": [
"Visually apparent headings are not programmatically identified [31(a), 31(b), B15]",
"Programmatically identified heading levels do not match the visual outline level [31(a), 31(b), B15]"
]
}
]
},
{
"title": "10 Web: Data Tables",
"items": [
"Any data table's row or column headers are not identified programmatically [22(g), B13]",
"An image of a data table is found [22(g), B13]",
"A complex data table's data cells are not associated with its headers programmatically [22(h), B14]",
"An image of a complex data table is found [22(h), B14]"
]
},
{
"title": "11 Web: Style Sheet Dependence",
"items": [
"The order of the content changed and is not logical [22(d), B22]",
"Relevant content or information from a meaningful image is not available [22(d), B22]",
"Any content overlaps or becomes illegible [22(d), B22]",
"Programming code or other confusing elements are revealed on the page [22(d), B22]"
]
},
{
"title": "12 Web: Frames",
"items": [
"A frame's Title or Name is non-descriptive [22(i), B23]",
"An iframe's Title or Name is non-descriptive [22(i), B23]"
]
},
{
"title": "13 Web: Repetitive Content And Links",
"items": [
"There is no method to skip repetitive content [22(o), B5]",
"The skip function's target is not located after the repetitive content [22(o), B5]",
"The skip function does not work properly [22(o), B5]",
"The relative order of repeated components is different from other pages [31(a), 31(b), B3]"
]
},
{
"title": "14 Web: Required Plug-Ins",
"items": [
"In a public site, the link to download a required plug-in is not provided [22(m), B27]",
"The plug-in required to view content is not compliant [21(a)-(l) as applicable, No baseline]"
]
},
{
"title": "15 Web: Alternative (Accessible) Version",
"items": [
"An alternative page does not contain equivalent information as the primary page [22(k), B24]",
"The primary site can be made compliant [22(k), No baseline] "
]
}
]
}
source "https://rubygems.org"
gem "octokit", "~> 3.0"
require 'json'
require 'rubygems'
require 'bundler/setup'
require 'octokit'
str = File.open('508.json').read
item = JSON.parse(str)
def spaces(n)
Array.new(n, " ").join
end
# prints a human-readable indented list
def print_item(parent, indent=0)
indent = indent + 1
STDOUT.puts "#{spaces(indent)} #{parent['title']}"
parent["items"].each do |child|
STDOUT.puts "#{spaces(indent)} #{child}" if child.is_a?(String)
print_item(child, indent) if child.is_a?(Hash)
end
end
token = "githubtoken"
raise "Please set your GitHub API token" if token == "githubtoken"
client = Octokit::Client.new(access_token: token)
repo = "username/reponame"
raise "Please set your username and reponame" if repo == "username/reponame"
# could be anything, but 0.1.0 seems ok
milestone_version = "0.1.0"
# could be anything, but "508 Compliance" seems ok
milestone_description = "508 Compliance"
milestones = client.list_milestones(repo)
def milestone_exists?(milestones, description)
milestones.select {|m| m.description == description}.length > 0
end
def get_or_create_milestone_by_description(client, repo, description)
milestones = client.list_milestones(repo)
milestone = milestones.select {|m| m.description == description}.first
if milestone.nil?
client.create_milestone(repo, milestone_version, {description: milestone_description})
milestones = client.list_milestones(repo)
milestone = milestones.select {|m| m.description == description}.first
end
milestone
end
def array_contents(arr)
arr.map {|a| a.class}.uniq.first
end
def flatten_items(parent, arr, milestone_number)
parent["items"].each do |child|
if child.is_a?(String)
arr << {
title: child,
body: "",
milestone: milestone_number,
labels: "508,#{parent['title']}",
category: parent['title']
}
end
flatten_items(child, arr, milestone_number) if child.is_a?(Hash)
end
arr
end
# create milestone
milestone = get_or_create_milestone_by_description(client, repo, milestone_description)
issues = flatten_items(item, [], milestone.number)
# create github issues
issues.each do |issue|
client.create_issue(
repo,
issue[:title],
issue[:body],
{
milestone: issue[:milestone],
labels: issue[:labels]
}
)
end
categories = issues.map {|i| i[:category]}.uniq.map do |c|
{
heading: c,
issues: issues.select {|i| i[:category] == c}
}
end
# create markdown checklist
# copy and paste terminal output into a GitHub Issue, Pull Request, or Gist
# e.g. https://gist.github.com/adelevie/dec4f35c992c6ff1014d
categories.each do |c|
STDOUT.puts "## #{c[:heading]}"
c[:issues].each do |issue|
STDOUT.puts "- [ ] #{issue[:title]}"
end
STDOUT.puts "\n"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment