@@ -48,6 +48,10 @@ public struct Accessibility: Hashable, Sendable {
4848 /// https://www.w3.org/2021/a11y-discov-vocab/latest/#accessibilityHazard
4949 public var hazards : [ Hazard ]
5050
51+ /// Justifications for non-conformance based on exemptions in a given
52+ /// jurisdiction.
53+ public var exemptions : [ Exemption ]
54+
5155 /// Accessibility profile.
5256 public struct Profile : Hashable , Sendable {
5357 public let uri : String
@@ -62,6 +66,24 @@ public struct Accessibility: Hashable, Sendable {
6266 public static let epubA11y10WCAG20AA = Profile ( " http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aa " )
6367 /// EPUB Accessibility 1.0 - WCAG 2.0 Level AAA
6468 public static let epubA11y10WCAG20AAA = Profile ( " http://www.idpf.org/epub/a11y/accessibility-20170105.html#wcag-aaa " )
69+ /// EPUB Accessibility 1.1 - WCAG 2.0 Level A
70+ public static let epubA11y11WCAG20A = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.0-a " )
71+ /// EPUB Accessibility 1.1 - WCAG 2.0 Level AA
72+ public static let epubA11y11WCAG20AA = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aa " )
73+ /// EPUB Accessibility 1.1 - WCAG 2.0 Level AAA
74+ public static let epubA11y11WCAG20AAA = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.0-aaa " )
75+ /// EPUB Accessibility 1.1 - WCAG 2.1 Level A
76+ public static let epubA11y11WCAG21A = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.1-a " )
77+ /// EPUB Accessibility 1.1 - WCAG 2.1 Level AA
78+ public static let epubA11y11WCAG21AA = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aa " )
79+ /// EPUB Accessibility 1.1 - WCAG 2.1 Level AAA
80+ public static let epubA11y11WCAG21AAA = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.1-aaa " )
81+ /// EPUB Accessibility 1.1 - WCAG 2.2 Level A
82+ public static let epubA11y11WCAG22A = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.2-a " )
83+ /// EPUB Accessibility 1.1 - WCAG 2.2 Level AA
84+ public static let epubA11y11WCAG22AA = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aa " )
85+ /// EPUB Accessibility 1.1 - WCAG 2.2 Level AAA
86+ public static let epubA11y11WCAG22AAA = Profile ( " https://www.w3.org/TR/epub-a11y-11#wcag-2.2-aaa " )
6587 }
6688
6789 public struct Certification : Hashable , Sendable {
@@ -177,8 +199,25 @@ public struct Accessibility: Hashable, Sendable {
177199 /// The work includes an index to the content.
178200 public static let index = Feature ( " index " )
179201
180- /// The work includes equivalent print page numbers. This setting is most commonly used with ebooks for which
181- /// there is a print equivalent.
202+ /// The resource includes static page markers, such as those identified
203+ /// by the doc-pagebreak role (DPUB-ARIA-1.0).
204+ ///
205+ /// This value is most commonly used with ebooks for which there is a
206+ /// statically paginated equivalent, such as a print edition, but it is
207+ /// not required that the page markers correspond to another work. The
208+ /// markers may exist solely to facilitate navigation in purely digital
209+ /// works.
210+ public static let pageBreakMarkers = Feature ( " pageBreakMarkers " )
211+
212+ /// The resource includes a means of navigating to static page break
213+ /// locations.
214+ ///
215+ /// The most common way of providing page navigation in digital
216+ /// publications is through a page list.
217+ public static let pageNavigation = Feature ( " pageNavigation " )
218+
219+ // https://github.com/readium/go-toolkit/issues/92
220+ @available ( * , deprecated, renamed: " pageNavigation " )
182221 public static let printPageNumbers = Feature ( " printPageNumbers " )
183222
184223 /// The reading order of the content is clearly defined in the markup (e.g., figures, sidebars and other
@@ -341,14 +380,58 @@ public struct Accessibility: Hashable, Sendable {
341380 public static let none = Hazard ( " none " )
342381 }
343382
383+ /// ``Exemption`` allows content creators to identify publications that do
384+ /// not meet conformance requirements but fall under exemptions in a given
385+ /// juridiction.
386+ ///
387+ /// While this list is currently limited to exemptions covered by the
388+ /// European Accessibility Act, it will be extended to cover additional
389+ /// exemptions in the future.
390+ public struct Exemption : Hashable , Sendable {
391+ public let id : String
392+
393+ public init ( _ id: String ) {
394+ self . id = id
395+ }
396+
397+ /// Article 14, paragraph 1 of the European Accessibility Act states
398+ /// that its accessibility requirements shall apply only to the extent
399+ /// that compliance: … (b) does not result in the imposition of a
400+ /// disproportionate burden on the economic operators concerned
401+ /// https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32019L0882#d1e2148-70-1
402+ public static let eaaDisproportionateBurden = Exemption ( " eaa-disproportionate-burden " )
403+
404+ /// Article 14, paragraph 1 of the European Accessibility Act states
405+ /// that its accessibility requirements shall apply only to the extent
406+ /// that compliance: (a) does not require a significant change in a
407+ /// product or service that results in the fundamental alteration of its
408+ /// basic nature
409+ /// https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32019L0882#d1e2148-70-1
410+ public static let eaaFundamentalAlteration = Exemption ( " eaa-fundamental-alteration " )
411+
412+ /// The European Accessibility Act defines a microenterprise as: an
413+ /// enterprise which employs fewer than 10 persons and which has an
414+ /// annual turnover not exceeding EUR 2 million or an annual balance
415+ /// sheet total not exceeding EUR 2 million.
416+ ///
417+ /// It further states in Article 4, paragraph 5: Microenterprises
418+ /// providing services shall be exempt from complying with the
419+ /// accessibility requirements referred to in paragraph 3 of this
420+ /// Article and any obligations relating to the compliance with those
421+ /// requirements.
422+ /// https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32019L0882#d1e1798-70-1
423+ public static let eaaMicroenterprise = Exemption ( " eaa-microenterprise " )
424+ }
425+
344426 public init (
345427 conformsTo: [ Profile ] = [ ] ,
346428 certification: Certification ? = nil ,
347429 summary: String ? = nil ,
348430 accessModes: [ AccessMode ] = [ ] ,
349431 accessModesSufficient: [ [ PrimaryAccessMode ] ] = [ ] ,
350432 features: [ Feature ] = [ ] ,
351- hazards: [ Hazard ] = [ ]
433+ hazards: [ Hazard ] = [ ] ,
434+ exemptions: [ Exemption ] = [ ]
352435 ) {
353436 self . conformsTo = conformsTo
354437 self . certification = certification
@@ -357,6 +440,7 @@ public struct Accessibility: Hashable, Sendable {
357440 self . accessModesSufficient = accessModesSufficient
358441 self . features = features
359442 self . hazards = hazards
443+ self . exemptions = exemptions
360444 }
361445
362446 public init ? ( json: Any ? , warnings: WarningLogger ? = nil ) throws {
@@ -394,7 +478,8 @@ public struct Accessibility: Hashable, Sendable {
394478 }
395479 . filter { !$0. isEmpty } ,
396480 features: parseArray ( jsonObject [ " feature " ] ) . map ( Feature . init) ,
397- hazards: parseArray ( jsonObject [ " hazard " ] ) . map ( Hazard . init)
481+ hazards: parseArray ( jsonObject [ " hazard " ] ) . map ( Hazard . init) ,
482+ exemptions: parseArray ( jsonObject [ " exemption " ] ) . map ( Exemption . init)
398483 )
399484 }
400485
@@ -413,6 +498,7 @@ public struct Accessibility: Hashable, Sendable {
413498 " accessModeSufficient " : encodeIfNotEmpty ( accessModesSufficient. map { $0. map ( \. rawValue) } ) ,
414499 " feature " : encodeIfNotEmpty ( features. map ( \. id) ) ,
415500 " hazard " : encodeIfNotEmpty ( hazards. map ( \. id) ) ,
501+ " exemption " : encodeIfNotEmpty ( exemptions. map ( \. id) ) ,
416502 ] )
417503 }
418504}
0 commit comments