Physical Data Model - Tanaguru/KBAccess GitHub Wiki

KBAccess PDM

Index

#Foreword

This document assume that the reader knows what the web accessibility consists in and what is an accessibility reference such as WCAG.

#KBAccess data model in a nutshell

##Reference

KBAccess data model is designed to host several accessibility references :

In this document we'll use the following terms :

  • reference test : the entities of an accessibility reference that can actually be tested
  • reference info : the entities of an accessibility reference that have structure purpose, and thus doesn't have to be tested
  • reference depth : the nesting level of an accessibility reference component

For the three references implemented we have :

WCAG 2.0 AccessiWeb 2.2 Rgaa 2.2.1 Depth Depth nature
principles +2 info
guidelines themes themes +1 info
success criteria criteria tests -1 test
techniques tests -2 test

##Subject

The central entity of KBAccess is the "example of accessibility".

An example is described by 3 tables :

  • testcase : which test of which accessibility reference
  • webarchive : archive of the page the test is performed on, at a specific date
  • result : passed, failed or not applicable

##Users

Users can create and manage examples of accessbility depending on their account access level :

  • contributor : can create examples and manage the ones they created
  • moderator : can do everything a contributor can do and also manage every testcases of the application
  • administrator : can do everything a moderator can do and also manage users

#Description of the data model

##The "reference" table

###Structure Represents the accessibility reference

###Specific fields

  • The field info_max_depth : is positive and represents the highest info depth
  • The field test_max_depth : is negative and represents the lowest test depth

###Examples

id_reference label cd_reference country info_max_depth test_max_depth ...
1 WCAG 2.0 WCAG20 international +2 -2 ...
2 AccessiWeb 2.2 AW22 france +1 -2 ...
3 Rgaa 2.2.1 RGAA221 france +1 -1 ...

##The "reference_depth" table

###Structure Represents the depth of a reference entity (info or test).

Examples

WCAG 2.0 entries :

id_reference_depth cd_reference_depth depth
1 Principle +2
2 Guideline +1
3 Success criteria -1
4 Technique -2

AccessiWeb 2.2 entries :

id_reference_depth cd_reference_depth depth
5 Theme +1
6 Criterion -1
7 Test -2

Rgaa 2.2.1 entries :

id_reference_depth cd_reference_depth depth
8 Theme +1
9 Test -1

##The "reference_info" table

###Structure Represents the info entities of an accessibility reference.

Specific fields

id_reference_info_parent :

  • can be NULL (the highest depth info doesn't have a parent)
  • references the parent reference_info in case the corresponding reference has several info depths (such as WCAG 2.0)

Examples

WCAG 2.0 entries (2 info depths so the parent column is used) :

id_reference_info id_reference_info_parent cd_reference_info id_reference_depth
1 NULL 1. Perceivable 1
2 NULL 2. Operable 1
... ... ... ...
5 1 1.1 2
6 1 1.2 2
7 1 1.3 2
8 1 1.4 2
9 2 2.1 2
10 2 2.2 2
... ... ... ...

AccessiWeb 2.2 entries (1 info depth so the parent column is not used):

id_reference_info id_reference_info_parent cd_reference_info id_reference_depth
100 NULL 1. Images 5
101 NULL 2. Frames 5
102 NULL 3. Colors 5
103 NULL 4. Multimedia 5
104 NULL 5. Tables 5
105 NULL 6. Links 5
... ... ... ...

Rgaa 2.2.1 entries (1 info depth so the parent column is not used) :

id_reference_info id_reference_info_parent cd_reference_info id_reference_depth
200 NULL 1. Frames 8
201 NULL 2. Colors 8
202 NULL 3. Forms 8
203 NULL 4. Pictures 8
204 NULL 5. Multimedia 8
205 NULL 6. Navigation 8
... ... ... ...

##The "reference_test" table

###Structure Represents the test entities of an accessibility reference.

Specific fields

id_reference :

  • for the tests with depth -1 : the id of the corresponding reference
  • for the tests with depth below -1 : NULL

id_reference_info :

  • for the tests with depth -1 : the id of the corresponding reference_info
  • for the tests with depth below -1 : NULL

id_level :

  • for the tests with depth -1 : the id of the corresponding level
  • for the tests with depth below -1 : NULL

Indeed (for n > 1), a test with depth -n is linked to a test with depth -n+1 and not directly to a reference, only the test of the highest depth has the informations.

Two triggers are implemented to ensure data consistency

  • they force id_reference, id_reference_info and id_level to be NULL if test depth is not -1 before insert and update.

Examples

WCAG 2.0 entries :

id_reference_test cd_reference_test label id_reference_depth id_reference_info id_reference id_level ...
1 WCAG20-010101 1.1.1 3 5 1 1 ...
... ... ... ... ... ... ... ...
2 WCAG20-010301 1.3.1 3 7 1 1 ...
... ... ... ... ... ... ... ...
3 WCAG20-030302 3.3.2 3 18 1 1 ...
... ... ... ... ... ... ... ...
4 WCAG20-040102 4.1.2 3 22 1 1 ...
... ... ... ... ... ... ... ...
40 WCAG20-SL26 SL26 4 NULL NULL NULL ...
41 WCAG20-SL30 SL30 4 NULL NULL NULL ...
... ... ... ... ... ... ... ...

AccessiWeb 2.2 entries :

id_reference_test cd_reference_test label id_reference_depth id_reference_info id_reference id_level ...
100 AW21-0101 1.1 6 100 2 4 ...
101 AW21-0202 2.1 6 200 2 4 ...
... ... ... ... ... ... ... ...
150 AW21-010101 1.1.1 7 NULL NULL NULL ...
151 AW21-010102 1.1.2 7 NULL NULL NULL ...
... ... ... ... ... ... ... ...
152 AW21-020201 2.2.1 7 NULL NULL NULL ...
153 AW21-020202 2.2.2 7 NULL NULL NULL ...
... ... ... ... ... ... ...

Rgaa 2.2.1

id_reference_test cd_reference_test label id_reference_depth id_reference_info id_reference id_level ...
201 RGAA221-0101 1.1 9 200 3 7 ...
202 RGAA221-0102 1.2 9 200 3 8 ...
... ... ... ... ... ... ... ...
203 RGAA221-0201 2.1 9 201 3 8 ...
204 RGAA221-0202 2.2 9 201 3 8 ...
... ... ... ... ... ... ... ...

##The "reference_test_reference_test" association table

###Structure Represents the relation between test entities of an accessibility reference.

The relation between test depths can be :

  • 1..n for AccessiWeb 2.2 : A criterion is composed of several tests, a test can reference only one criterion
  • n..n for WCAG 2.0 : A success criteria is composed of several techniques, a technique can reference one or several success criteria

(Rgaa 2.2.1 has only one test depth)

Examples

(See reference_test examples for reference_test entries).

WCAG 2.0 entries :

  • The success criteria 1.1.1 is composed of several techniques including SL26 and SL30
  • The success criteria 1.3.1 is composed of several techniques including SL26
  • The success criteria 3.3.2 is composed of several techniques including SL26
  • The success criteria 4.1.2 is composed of several techniques including SL26 and SL30
  • The technique SL26 refers to several success criteria including 1.1.1, 1.3.1, 3.3.2, 4.1.2
  • The technique SL26 refers to several success criteria including 1.1.1, 4.1.2
id_reference_test_1 id_reference_test_2
1 40
1 41
... ...
2 40
... ...
3 40
... ...
4 40
4 41
... ...
40 1
40 2
40 3
40 4
... ...
41 1
41 4
... ...

AccessiWeb 2.2

  • The criterion 1.1 is composed of several tests including 1.1.1 and 1.1.2
  • The criterion 2.2 is composed of several tests including 2.2.1 and 2.2.2
  • The test 1.1.1 refers to the criterion 1.1
  • The test 1.1.2 refers to the criterion 1.1
  • The test 2.2.1 refers to the criterion 2.2
  • The test 2.2.2 refers to the criterion 2.2
id_reference_test_1 id_reference_test_2
100 150
100 151
... ...
101 152
101 153
... ...
150 100
151 100
152 101
153 101
... ...

##The "level" table

Structure

Represents the levels of compliance of accesibility references.

Examples

WCAG 2.0 entries :

id_level cd_level ...
1 A ...
2 AA ...
3 AAA ...

AccessiWeb 2.2 entries :

id_level cd_level ...
4 Bronze ...
5 Silver ...
6 Gold ...

Rgaa 2.2.1 entries :

id_level cd_level ...
7 A ...
8 AA ...
9 AAA ...