aaact-aatia / a11y-ict-wizard

ICT accessibility requirements wizard deployed to SSC Azure environment
MIT License
1 stars 2 forks source link

Split "include with parent" and "inforomative" logic #38

Open benjamin-rolleman opened 1 year ago

benjamin-rolleman commented 1 year ago

Each clause record has an "informative" Boolean value which can be checked or unchecked in the edit feature of the wizard. This checkbox toggles two different actions:

  1. it includes the clause whenever the parent clause is selected (normally because an informative clause provides context to the whole section and should be included
  2. marks the clause as not testable, meaning it is excluded from the evaluation template (annex Y)

In most cases we do want to do both of these actions when a clause is informative, but not always. A example of this is 11.1.3.1.2 Info and Relationships (closed). this clause does not provide extra information as a whole to 11.1.3.1 Info and Relationships, but yet isn't testable either. This means that if you select the checkbox it will always be included with 11.1.3.1 Info and Relationships and will not allow the user to unselect it. Or if you un check the checkbox the user can select or unselect it, but the entry will show up in the evaluation template, despite having no testable requirements.

What we need to do to fix this is create a second checkbox "testable" or similar to indicate if the item should be included in the evaluation template and update the existing checkbox to just indicate if we should include the informative clause with the parent or not. based on a quick scan of the code the following high-level changes may be needed:

  1. ad the checkbox in the editor
  2. add the extra field in the model and update the generator controller function getTestableClauses function. to use this value to determine if the element is testable or not
  3. update the logic in the clause tree to support this change
  4. Update the data to make sure all clauses have the appropriate selections made

Other changes may need to be made, I didn't fully investigate exactly what it would take to implement this. After this is implemented the tool should be fullly tested as this affects selections and if bugs exist could be unpredictable.