display only data that is meaningful (eg, if either an outcome or observations are set)
don't hide any data that is meaningful (ensure if anything is set for anything, it shows in the report)
make easy to navigate with assistive tecnologies; we can't make complex data less complex, but can pick the least inconvenient way to browse
Easy to navigate
Some things to try and make it easy to navigate:
separate tables for each Guideline
Guideline is in table's legend so it is available via screenreader table shortcuts
data in Result and Observations cells is not structured as yet another table, it is 'just' headings plus paragraphs
Caveats:
if observation is multiple lines, the headings with the sample names do not line up. I think that's a good compromise: lining them up would require more whitespace and technically tricky to make workable in screenreaders, as solutions may include nested tables (annoying to navigate) or some form of CSS Grid (which would cause table semantics to be overriden)
When what is displayed
Case 1: there are no sample pages
This is the 'simplest' case. We display a result and an observation if there is one.
Case 2: there are sample pages, but none have results or observations
This is the same as above, just a result and an observation. There is no need to distinguish between entire sample and individual sample pages.
Case 3: there are sample pages with results, and some without
Three sample pages were defined. An outcome + description was set for the entire sample. An outcome + description was also set for the Contact sample pages. The About us page was left untouched (no outcome. no description).
Because there are multiple results now, we display headings: one for Entire sample, one for each sample. We only do this for samples that have some result (a description AND/OR an outcome). We don't display the pages that were left untouched.
Observations can be as long as they need to be, for instance if they have code examples, they could span over many lines.
Case 4: there are sample pages with results, some have only outcome, no description
As said above, we don't display the sample page if it has no outcome and no observations. In the case that an outcome was set, but no observation, we display that sample page. Under Outcome, we display the outcome, under Observations we display a fallback text.
Goals:
Easy to navigate
Some things to try and make it easy to navigate:
legend
so it is available via screenreader table shortcutsCaveats:
When what is displayed
Case 1: there are no sample pages
This is the 'simplest' case. We display a result and an observation if there is one.
Case 2: there are sample pages, but none have results or observations
This is the same as above, just a result and an observation. There is no need to distinguish between entire sample and individual sample pages.
Case 3: there are sample pages with results, and some without
Three sample pages were defined. An outcome + description was set for the entire sample. An outcome + description was also set for the Contact sample pages. The About us page was left untouched (no outcome. no description).
Because there are multiple results now, we display headings: one for Entire sample, one for each sample. We only do this for samples that have some result (a description AND/OR an outcome). We don't display the pages that were left untouched.
Observations can be as long as they need to be, for instance if they have code examples, they could span over many lines.
Case 4: there are sample pages with results, some have only outcome, no description
As said above, we don't display the sample page if it has no outcome and no observations. In the case that an outcome was set, but no observation, we display that sample page. Under Outcome, we display the outcome, under Observations we display a fallback text.