Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Added subsection support to the FlowsheetDataGrid #2132

Merged
merged 5 commits into from
Apr 12, 2024
Merged

Conversation

cm9361
Copy link
Contributor

@cm9361 cm9361 commented Apr 11, 2024

Summary

What was changed:
Subsection support was added to the FlowsheetDataGrid component.

Why it was changed:
The change was made to satisfy a functional requirement of a consumer of the FlowsheetDataGrid component.

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-10360


Thank you for contributing to Terra.
@cerner/terra

@github-actions github-actions bot temporarily deployed to preview-pr-2132 April 11, 2024 18:46 Destroyed
@cm9361 cm9361 marked this pull request as ready for review April 11, 2024 19:02
| **rows** | Array | Optional | [] | An array of row objects to be rendered in the section. |
| **subsections** | Array | Optional | [] | An array of subsections objects to be rendered within the section. |

#### Subsection
Copy link
Contributor

@adoroshk adoroshk Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT - Shouldn't the Subsection be the same level header as Section: ### Subsection? Looks smaller than Section and Rows headers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adoroshk - This is a good call out. I copied the structure from the Terra Table component where it originates. However, I could update this style for both components. I do think that is appropriate.

@mjpalazzo
Copy link
Contributor

@cm9361 - I validated with Chrome, Edge, and JAWS with Edge. The KB navigation works as required. Screen reader navigation and announcements work as required. I observed one minor issue. If I am on a row in the body of the grid and press the End key (fn+right arrow on my MacBook), JAWS announces the labels of all the sections and subsections, regardless where the focus is located. For example, if focus is in column 6 row 4 in section 1, subsection 1, JAWS announces "End, Primary Contact, Test Section, Test Subsection, Test Subsection number 2, Test Section number 2, Quinzel, Harleen, Column 6"
Some thing similar happens if I navigate from a column header with the Down Arrow. For example when I navigate the last column to column 6 row 4. JAWS announces, "Fleck, Arthur, Primary Contact, Test Section, Test Subsection, Test Subsection number 2, Test Section number 2, Quinzel, Harleen, Column 6 row 4"
This happens for columns 2 - 5 for any cell that follows a section or subsection header.

@cm9361
Copy link
Contributor Author

cm9361 commented Apr 12, 2024

@cm9361 - I validated with Chrome, Edge, and JAWS with Edge. The KB navigation works as required. Screen reader navigation and announcements work as required. I observed one minor issue. If I am on a row in the body of the grid and press the End key (fn+right arrow on my MacBook), JAWS announces the labels of all the sections and subsections, regardless where the focus is located. For example, if focus is in column 6 row 4 in section 1, subsection 1, JAWS announces "End, Primary Contact, Test Section, Test Subsection, Test Subsection number 2, Test Section number 2, Quinzel, Harleen, Column 6" Some thing similar happens if I navigate from a column header with the Down Arrow. For example when I navigate the last column to column 6 row 4. JAWS announces, "Fleck, Arthur, Primary Contact, Test Section, Test Subsection, Test Subsection number 2, Test Section number 2, Quinzel, Harleen, Column 6 row 4" This happens for columns 2 - 5 for any cell that follows a section or subsection header.

@mjpalazzo - Thank you for the feedback. Isn't the issue you described a known pre-existing issue? I thought we landed on the fact that the attributes were semantically correct in this scenario. If it is the pre-existing issue and we want to address it somehow, do we need a JIRA for the work. I thought we had one open previously.

@mjpalazzo
Copy link
Contributor

@cm9361 - I validated with Chrome, Edge, and JAWS with Edge. The KB navigation works as required. Screen reader navigation and announcements work as required. I observed one minor issue. If I am on a row in the body of the grid and press the End key (fn+right arrow on my MacBook), JAWS announces the labels of all the sections and subsections, regardless where the focus is located. For example, if focus is in column 6 row 4 in section 1, subsection 1, JAWS announces "End, Primary Contact, Test Section, Test Subsection, Test Subsection number 2, Test Section number 2, Quinzel, Harleen, Column 6" Some thing similar happens if I navigate from a column header with the Down Arrow. For example when I navigate the last column to column 6 row 4. JAWS announces, "Fleck, Arthur, Primary Contact, Test Section, Test Subsection, Test Subsection number 2, Test Section number 2, Quinzel, Harleen, Column 6 row 4" This happens for columns 2 - 5 for any cell that follows a section or subsection header.

@mjpalazzo - Thank you for the feedback. Isn't the issue you described a known pre-existing issue? I thought we landed on the fact that the attributes were semantically correct in this scenario. If it is the pre-existing issue and we want to address it somehow, do we need a JIRA for the work. I thought we had one open previously.

@cm9361 - you are correct. I had forgotten that this is a pre-existing issue. We may already have a Jira for it. I will follow up with Chris. As I said it is minor and does not affect funtionality, so we will deal with it in the future. Your changes are working well so I approve.

@cm9361
Copy link
Contributor Author

cm9361 commented Apr 12, 2024

@chrismichalewicz
Copy link

@mjpalazzo @eawww When navigating to the Grid it announces the # of rows and columns, should it also announce the number of sections contained within the grid? I was unable to find an ARIA example that had sections to test to see how they handled it.

@cm9361
Copy link
Contributor Author

cm9361 commented Apr 12, 2024

@mjpalazzo @eawww When navigating to the Grid it announces the # of rows and columns, should it also announce the number of sections contained within the grid? I was unable to find an ARIA example that had sections to test to see how they handled it.

@chrismichalewicz - The table does not have a concept of sections. That is functionality that we added. The screen reader would not have a way to announce that.

@chrismichalewicz
Copy link

chrismichalewicz commented Apr 12, 2024

@mjpalazzo @eawww When navigating to the Grid it announces the # of rows and columns, should it also announce the number of sections contained within the grid? I was unable to find an ARIA example that had sections to test to see how they handled it.

@chrismichalewicz - The table does not have a concept of sections. That is functionality that we added. The screen reader would not have a way to announce that.

Thanks @cm9361 for clarifying! It works well for me as well, great job! +1 I will also add the Functionally Reviewed label.

@mjpalazzo
Copy link
Contributor

@mjpalazzo @eawww When navigating to the Grid it announces the # of rows and columns, should it also announce the number of sections contained within the grid? I was unable to find an ARIA example that had sections to test to see how they handled it.

@chrismichalewicz - The table does not have a concept of sections. That is functionality that we added. The screen reader would not have a way to announce that.

Thanks @cm9361 for clarifying! It works well for me as well, great job! +1 I will also add the Functionally Reviewed label.

Agreed...WAI and MDN have notthing to say about tables with sections.

@github-actions github-actions bot temporarily deployed to preview-pr-2132 April 12, 2024 19:38 Destroyed
@cm9361 cm9361 merged commit 864c6a0 into main Apr 12, 2024
22 checks passed
@cm9361 cm9361 deleted the flowsheet-subsections branch April 12, 2024 20:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants