|
| 1 | +# Accessibility Extension |
| 2 | +_Author: [Vincenzo Tilotta](https://github.com/tailot)_ |
| 3 | + |
| 4 | +An extension allowing for the addition of the content for people with disabilities. |
| 5 | + |
| 6 | +## Open Badges 2.0 |
| 7 | + |
| 8 | +Property | Type | Value Description |
| 9 | +-------------|-------------|--------- |
| 10 | +**@context** | context IRI | [https://w3id.org/openbadges/extensions/accessibilityExtension/context.json](https://w3id.org/openbadges/extensions/accessibilityExtension/context.json) |
| 11 | +**type** | type IRI array |`['Extension', 'extensions:Accessibility']` |
| 12 | +**accessibilityAPI** | text | Indicates that the resource is compatible with the referenced accessibility API. Possible values: `['AndroidAccessibility', 'ARIA', 'ATK', 'AT-SPI', 'BlackberryAccessibility', 'iAccessible2', 'iOSAccessibility', 'JavaAccessibility', 'MacOSXAccessibility', 'MSAA', 'UIAutomation']` |
| 13 | +**accessibilityControl** | text | Identifies one or more input methods that allow access to all of the application functionality. Possible values: `['fullKeyboardControl', 'fullMouseControl', 'fullSwitchControl', 'fullTouchControl', 'fullVideoControl', 'fullVoiceControl']` |
| 14 | +**accessibilityFeature** | text | Content features of the resource, such as accessible media, supported enhancements for accessibility and alternatives. `['alternativeText', 'annotations', 'audioDescription', 'bookmarks', 'braille', 'captions', 'ChemML', 'describedMath', 'displayTransformability', 'highContrastAudio', 'highContrastDisplay', 'index', 'largePrint', 'latex', 'longDescription','MathML', 'none', 'printPageNumbers', 'readingOrder', 'signLanguage', 'structuralNavigation', 'tableOfContents', 'taggedPDF', 'tactileGraphic', 'tactileObject', 'timingControl', 'transcript', 'ttsMarkup', 'unlocked']` |
| 15 | +**accessibilityHazard** | text | A characteristic of the described resource that is physiologically dangerous to some users. Related to http://www.w3.org/TR/UNDERSTANDING-WCAG20/seizure.html `['flashing', 'noFlashingHazard', 'motionSimulation', 'noMotionSimulationHazard', 'sound', 'noSoundHazard']` |
| 16 | + |
| 17 | +**Extendable Badge Objects:** |
| 18 | +Assertion, BadgeClass, Issuer |
| 19 | + |
| 20 | +**Example implementation:** |
| 21 | +```json |
| 22 | +{ |
| 23 | + "name": "Awesome Robotics Badge", |
| 24 | + "description": "For doing awesome things with robots that people think is pretty great.", |
| 25 | + "image": "http://openbadges.it/logo.png", |
| 26 | + "criteria": "https://example.org/robotics-badge.html", |
| 27 | + "tags": [ |
| 28 | + "robots", |
| 29 | + "awesome" |
| 30 | + ], |
| 31 | + "issuer": "https://example.org/badge/issuer.json", |
| 32 | + "extensions:Accessibility": { |
| 33 | + "@context":"https://w3id.org/openbadges/extensions/accessibilityExtension/context.json", |
| 34 | + "type": ["Extension", "extensions:Accessibility"], |
| 35 | + "accessibilityAPI": "ARIA", |
| 36 | + "accessibilityControl": ["fullKeyboardControl","fullMouseControl","fullTouchControl"], |
| 37 | + "accessibilityFeature": "audioDescription", |
| 38 | + "accessibilityHazard": "noFlashingHazard", |
| 39 | + "url": "http://exampleaccessiblecontent.org/" |
| 40 | + } |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +## Open Badges 3.0 |
| 45 | + |
| 46 | +The adaptation of this extension ultimately consist on extending the |
| 47 | +datamodel, adding existing accessibility attributes to the entities |
| 48 | +`Achievement`, `AchievementCredential` and `Profile`. |
| 49 | + |
| 50 | +The OB 3.0 JSON-LD context has already defined some terms that this |
| 51 | +extension to all entities of the specification. So, you'll need a JSON-LD |
| 52 | +context with the remaining terms. |
| 53 | + |
| 54 | +### Accessibility OB 3.0 JSON-LD Context |
| 55 | +```json |
| 56 | +{ |
| 57 | + "@context": { |
| 58 | + "@protected": true, |
| 59 | + "accessibilityAPI": "https://schema.org/accessibilityAPI", |
| 60 | + "accessibilityControl": "https://schema.org/accessibilityControl", |
| 61 | + "accessibilityFeature": "https://schema.org/accessibilityFeature", |
| 62 | + "accessibilityHazard": "https://schema.org/accessibilityHazard" |
| 63 | + } |
| 64 | +} |
| 65 | +``` |
| 66 | + |
| 67 | +Given the fact that this extension applies to three different entities, we |
| 68 | +would need three different JSON schemas. The existing extension JSON schema |
| 69 | +doesn't work, as it defines the attributes at the root level, |
| 70 | +while we need to define them for the `Achievement`, `AchievementCredential` |
| 71 | +and `Profile` entities. |
| 72 | + |
| 73 | +### Accessibility OB 3.0 JSON Schema for AchievementCredential |
| 74 | +```json |
| 75 | +{ |
| 76 | + "$schema": "https://json-schema.org/draft/2019-09/schema#", |
| 77 | + "$id": "https://openbadgespec.org/extensions/accessibilityExtension/schema_achievement_credential_obv3p0.json", |
| 78 | + "type": "object", |
| 79 | + "properties": { |
| 80 | + "accessibilityAPI": { |
| 81 | + "type": "string" |
| 82 | + }, |
| 83 | + "accessibilityControl": { |
| 84 | + "type": "array", |
| 85 | + "items": { |
| 86 | + "type": "string" |
| 87 | + } |
| 88 | + }, |
| 89 | + "accessibilityFeature": { |
| 90 | + "type": "string" |
| 91 | + }, |
| 92 | + "accessibilityHazard": { |
| 93 | + "type": "string" |
| 94 | + }, |
| 95 | + "url":{ |
| 96 | + "type": "string", |
| 97 | + "format": "uri" |
| 98 | + } |
| 99 | + }, |
| 100 | + "required": ["url","accessibilityFeature"], |
| 101 | + "additionalProperties": true |
| 102 | +} |
| 103 | +``` |
| 104 | + |
| 105 | +### Accessibility OB 3.0 JSON Schema for Achievement |
| 106 | +```json |
| 107 | +{ |
| 108 | + "$schema": "https://json-schema.org/draft/2019-09/schema#", |
| 109 | + "$id": "https://openbadgespec.org/extensions/accessibilityExtension/schema_achievement_obv3p0.json", |
| 110 | + "type": "object", |
| 111 | + "properties": { |
| 112 | + "credentialSubject": { |
| 113 | + "type": "object", |
| 114 | + "properties": { |
| 115 | + "achievement": { |
| 116 | + "type": "object", |
| 117 | + "properties": { |
| 118 | + "accessibilityAPI": { |
| 119 | + "type": "string" |
| 120 | + }, |
| 121 | + "accessibilityControl": { |
| 122 | + "type": "array", |
| 123 | + "items": { |
| 124 | + "type": "string" |
| 125 | + } |
| 126 | + }, |
| 127 | + "accessibilityFeature": { |
| 128 | + "type": "string" |
| 129 | + }, |
| 130 | + "accessibilityHazard": { |
| 131 | + "type": "string" |
| 132 | + }, |
| 133 | + "url":{ |
| 134 | + "type": "string", |
| 135 | + "format": "uri" |
| 136 | + } |
| 137 | + }, |
| 138 | + "required": ["url","accessibilityFeature"], |
| 139 | + "additionalProperties": true |
| 140 | + } |
| 141 | + }, |
| 142 | + "additionalProperties": true |
| 143 | + } |
| 144 | + }, |
| 145 | + "additionalProperties": true |
| 146 | +} |
| 147 | +``` |
| 148 | + |
| 149 | +### Accessibility OB 3.0 JSON Schema for Issuer Profile |
| 150 | +```json |
| 151 | +{ |
| 152 | + "$schema": "https://json-schema.org/draft/2019-09/schema#", |
| 153 | + "$id": "https://openbadgespec.org/extensions/accessibilityExtension/schema_profile_obv3p0.json", |
| 154 | + "type": "object", |
| 155 | + "properties": { |
| 156 | + "credentialSubject": { |
| 157 | + "type": "object", |
| 158 | + "properties": { |
| 159 | + "issuer": { |
| 160 | + "type": "object", |
| 161 | + "properties": { |
| 162 | + "accessibilityAPI": { |
| 163 | + "type": "string" |
| 164 | + }, |
| 165 | + "accessibilityControl": { |
| 166 | + "type": "array", |
| 167 | + "items": { |
| 168 | + "type": "string" |
| 169 | + } |
| 170 | + }, |
| 171 | + "accessibilityFeature": { |
| 172 | + "type": "string" |
| 173 | + }, |
| 174 | + "accessibilityHazard": { |
| 175 | + "type": "string" |
| 176 | + }, |
| 177 | + "url":{ |
| 178 | + "type": "string", |
| 179 | + "format": "uri" |
| 180 | + }, |
| 181 | + }, |
| 182 | + "required": ["url","accessibilityFeature"], |
| 183 | + "additionalProperties": true |
| 184 | + } |
| 185 | + }, |
| 186 | + "additionalProperties": true |
| 187 | + } |
| 188 | + }, |
| 189 | + "additionalProperties": true, |
| 190 | +} |
| 191 | +``` |
| 192 | + |
| 193 | +A credential with this extension applied to both entities is shown below. |
| 194 | +It adds the url of the above JSON-LD context (assuming is |
| 195 | +`https://openbadgespec.org/extensions/accessibilityExtension/context-3.0.0.json`) |
| 196 | +in its `@context` declaration and the url of the JSON schemas in its |
| 197 | +`credentialSchema` attribute. |
| 198 | + |
| 199 | +> You only need to include the JSON schema of the extended entity to use. |
| 200 | +
|
| 201 | + |
| 202 | +### Sample OpenBadgeCredential with Accessibility extension |
| 203 | +```json |
| 204 | +{ |
| 205 | + "@context": [ |
| 206 | + "https://www.w3.org/ns/credentials/v2", |
| 207 | + "https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.1.json", |
| 208 | + "https://openbadgespec.org/extensions/accessibilityExtension/context-3.0.0.json" |
| 209 | + ], |
| 210 | + "id": "http://example.com/credentials/3527", |
| 211 | + "type": ["VerifiableCredential", "OpenBadgeCredential", "Accessibility"], |
| 212 | + "issuer": { |
| 213 | + "id": "https://example.com/issuers/876543", |
| 214 | + "type": ["Profile","Accessibility"], |
| 215 | + "name": "Example Corp", |
| 216 | + "accessibilityAPI": "ARIA", |
| 217 | + "accessibilityControl": ["fullKeyboardControl","fullMouseControl","fullTouchControl"], |
| 218 | + "accessibilityFeature": "audioDescription", |
| 219 | + "accessibilityHazard": "noFlashingHazard", |
| 220 | + "url": "http://exampleaccessiblecontent.org/" |
| 221 | + |
| 222 | + }, |
| 223 | + "validFrom": "2010-01-01T00:00:00Z", |
| 224 | + "name": "Teamwork Badge", |
| 225 | + "credentialSubject": { |
| 226 | + "id": "did:example:ebfeb1f712ebc6f1c276e12ec21", |
| 227 | + "type": "AchievementSubject", |
| 228 | + "achievement": { |
| 229 | + "id": "https://example.com/achievements/21st-century-skills/teamwork", |
| 230 | + "type": ["Achievement", "Accessibility"], |
| 231 | + "criteria": { |
| 232 | + "narrative": "Team members are nominated for this badge by their peers and recognized upon review by Example Corp management." |
| 233 | + }, |
| 234 | + "description": "This badge recognizes the development of the capacity to collaborate within a group environment.", |
| 235 | + "name": "Teamwork", |
| 236 | + "accessibilityAPI": "ARIA", |
| 237 | + "accessibilityControl": ["fullKeyboardControl","fullMouseControl","fullTouchControl"], |
| 238 | + "accessibilityFeature": "audioDescription", |
| 239 | + "accessibilityHazard": "noFlashingHazard", |
| 240 | + "url": "http://exampleaccessiblecontent.org/" |
| 241 | + } |
| 242 | + }, |
| 243 | + "accessibilityAPI": "ARIA", |
| 244 | + "accessibilityControl": ["fullKeyboardControl","fullMouseControl","fullTouchControl"], |
| 245 | + "accessibilityFeature": "audioDescription", |
| 246 | + "accessibilityHazard": "noFlashingHazard", |
| 247 | + "url": "http://exampleaccessiblecontent.org/", |
| 248 | + "credentialSchema": [{ |
| 249 | + "id": "https://purl.imsglobal.org/spec/ob/v3p0/schema/json/ob_v3p0_achievementcredential_schema.json", |
| 250 | + "type": "1EdTechJsonSchemaValidator2019" |
| 251 | + }, { |
| 252 | + "id": "https://openbadgespec.org/extensions/accessibilityExtension/schema_achievement_credential_obv3p0.json", |
| 253 | + "type": "1EdTechJsonSchemaValidator2019" |
| 254 | + }, { |
| 255 | + "id": "https://openbadgespec.org/extensions/accessibilityExtension/schema_achievement_obv3p0.json", |
| 256 | + "type": "1EdTechJsonSchemaValidator2019" |
| 257 | + }, { |
| 258 | + "id": "https://openbadgespec.org/extensions/accessibilityExtension/schema_profile_obv3p0.json", |
| 259 | + "type": "1EdTechJsonSchemaValidator2019" |
| 260 | + }] |
| 261 | +} |
| 262 | +``` |
0 commit comments