DetailsList - Row should not read all information or should read out column headers?
Codepen demonstrating the issue
https://developer.microsoft.com/en-us/fabric#/controls/web/detailslist
Actual behavior:
Bug 1 says: When you tab into the row, it reads all of the row information, not cell by cell. Bug 2 says: When you tab into the row, as it reads all of the information, it should read the column header that the cell belongs to as well.
Expected behavior:
Bug 1 says: Screen reader should not pass all cell value information in one go. Screen reader should read cell value with their respective column as per user action. Bug 2 says: Row values should be associated with column header. It should announce as "Abc.txt, Column header File Name, March 12, 2019, Column header Created Date"
Documentation describing expected behavior
This is a direct opposite guidance for Bug number 9 in #6646. I now have 2 bugs suggesting different solutions.
MAS 4.2.1 – Object Information (33A)
@KevinTCoughlin or @natalieethell are you familiar with the expected DetailsList behavior in this case?
@betrue-final-final is probably best. I actually believe he's answered this request before, but I can't seem to find the issue and reply.
It's still possible to go through the row cell by cell for individual cell readout after tabbing into the row and then using the arrow keys. Is the concern in Narrator Scan mode? @betrue-final-final I'm interested to hear your thoughts on the correct behavior here.
Not sure if I'm just not doing it right, but I can't use arrow keys to go cell-by-cell in non-scan mode.
The concern wasn't specific for Scan or not-Scan mode. It was that when you go to a row, it reads you all the information. =\
I also have another bug suggesting another opposing way of doing this.
The bug says that the screenreader should announce the column headers when reading out all of the information.
Example: Abc.txt, Column header File Name, March 12, 2019, Column header Created Date...
Seems like there isn't a consensus on the correct behavior.
(Edited the original bug to reflect this new information.)
Ah, I see. Thanks for clarifying! I can't navigate cell-by-cell in non-scan mode either, however, I think that might be by design.
I'm now remembering that we actually had a very similar discussion about what should be read out by a screen reader when focused on a DetailsRow and Ben (@betrue-final-final) had a similar concern. Ben said the following:
There should be a shorthand readout. In OneDrive, for example, we read the name, file type, date modified and modified by. For a generic list, we could default to just the first column value, but it would be good to enable people to set more like we do in OneDrive. https://github.com/OfficeDev/office-ui-fabric-react/issues/7560#issuecomment-452743493
I mentioned that
when focus is placed on the row, the screen reader (both Narrator and NVDA have this behavior) read out all of the row's contents. https://github.com/OfficeDev/office-ui-fabric-react/issues/7560#issuecomment-454226969
Here's the solution we proposed for now:
[...] given what Ben said above about being able to customize the number of column headers read out, providing your own aria label as I mentioned above seems like the best option.
Here's a CodePen demonstrating how to do that. When focusing on a details row in the CodePen, you should hear Name Item [number] Value [number] read out in both Narrator and NVDA.
All you need to do is define an aria label for each item and then pass in a callback function to getRowAriaLabel that returns that row's aria label.
getRowAriaLabel={ (item: any) => item.ariaLabel }https://github.com/OfficeDev/office-ui-fabric-react/issues/7560#issuecomment-472134131
Let me know if you have any questions concerning the above or the other issue. Given the behavior of the screen readers and how they place focus on the entirety of the details row, the solution above is the only way I know of to ensure that only the first cell is read out.
Oh awesome. Thanks Natalie! I didn't see the other bug, and it looks like there was already a full on discussion on this. I'll try this out.