Right now if we can't get the ExpandCollapse pattern implemented (which I'm not
saying we can or can't. I just brought it up to my Engineer today), the
experience I'm proposing would say:
18 if(VisualStudio == QuiteAccessible) ... collapsed // if
This is what I mean about the concern I have with collapsed/folded code in the
middle of a line. But at least this would be better than the current experience
that is:
18 if(VisualStudio == QuiteAccessible) // if
(Note the complete omission of the collapsed region altogether!)
--Dante
-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On Behalf
Of Karl-Otto Rosenqvist
Sent: Tuesday, April 20, 2021 1:13 PM
To: program-l@xxxxxxxxxxxxx; Jaffar Sidek Ahmad <jaffar.sidek10@xxxxxxxxx>
Subject: [program-l] Re: Screen readers and collapsed regions
Hi all!
Ok, suggestions seems resonable.
Dante, how would you treat folded code that isn't a region? For example:
17 Just some code;
18 if (VisualStudio == QuiteAccessible)
19 {
20 Make happy sound();
21 } // if
22 More code
If you fold this it would be
17 Just some code;
18 if (VisualStudio == QuiteAccessible) // if
22 More code
If you remember to add a comment after every } you will be able to hear that
the if-statement is folded otherwise not.
Would it be possible to have the same behavior regardless of what's folded? In
my example the following text would be read for the collapsed
if-statement:
if (VisualStudio == QuiteAccessible) // if Collapsed or if (VisualStudio ==
QuiteAccessible) Collapsed
Perhaps it should say "Block collapsed" or similar when the block isn't named
as a region is?
If you're in a xaml, config, xml, html or cshtml file there are rarely regions
and therefore probably no distinct name to use when speaking the folded tag.
If only the tag name is used it would be quite hard to understand what tag is
folded. The wole line is visible in a dim color so you can see it if your eyes
work as expected. I vote for that the entire line would be spoken followed by
"Collapsed" or "Collapsed tag".
Kind regards
Karl-Otto
Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
+46 (0)701 75 98 56
karl-otto@xxxxxxxxxx
Den 2021-04-20 kl. 09:57, skrev Jaffar Sidek Ahmad:
Hello dante. When I use Eclipse or Android studio, There is an option** To leave the list, click on the immediately-following link:-
in the file or preferences menu to "Fold" or "Unfold" certain
components of code. This is known as code folding. For example, the
Import region which heads most java programs would, by default be
folded. So while we could hear the list of default imported libraries
or packages, we couldn't read them with the cursor keys until we went
to the Preferences/fold/unfold option to unfold the default list as it were.
Only then will the whole list of default imported modules or libraries
or packages be visible and readable to screen readers and navigable
with the cursor keys. I wonder then if this approach could work, that
regions could be made unfoldable so that the accessibility can be
toggled off and on by users who do or don't need them. Cheers!
On 20/4/2021 7:30 am, Dante Gagne (Redacted sender danteg for DMARC) wrote:
Hey folks,** To leave the list, click on the immediately-following link:-
Item just came up on my list and I've got an IDEA on how it should be
addressed, but I'd love feedback. Visual Studio provides "outlining"
which allows the user to collapse or expand regions of code for ease
of navigation.
For instance consider the following (I'm including line numbers for
understanding)
17 LineBeforeRegion()
18 #region MySample
19 CodeInRegion()
20 #endregion
21 LineAfterRegion()
In Visual Studio, you can use Ctrl+M, Ctrl+M to toggle outlining. If
you were to do that on line 18 here, the sighted user would see:
17 LineBeforeRegion()
18 MySample
21 LineAfterRegion()
However, line 18 would have a visual adorner to show that it's a
collapsed region. It's a single atomic unit, you can't use the cursor
keys to navigate into it or anything like that.
The issue is that the visual adorner on line 18 is not actually part
of the text buffer so it's completely invisible to the screen reader.
To a screen reader user, this code is more like:
17 LineBeforeRegion()
18
21 LineAfterRegion()
Which is probably quite frustrating. (If anyone has run into this,
you can use Ctrl+M, Ctrl+L to toggle ALL outlining, which will expand
everything. You can also use Ctrl+M, Ctrl+P to expand all the regions
and disable outlining altogether).
Now to my question. I want to fix this issue. What would folks want
to hear on line 18? I don't want to just say "MySample" since it
would sound like code and be indistinguishable. I hesitate to say
"Begin Collapsed Region MySample End Collapsed Region" since that
feels like overkill. For the record, it is possible to have a
collapsed region in the middle of text, so if you were to try really
hard you could have
18 SomeCode() CollapsedRegion SomeOtherCode()
Where "CollapsedRegion" is a collapsed region, but the SomeCode() and
SomeOtherCode() is legitimate code.
I should also point out that the Region identifiers won't be
navigable by character or anything, so right now, it's effectively a
single character. We are looking into a better fix there, but there
are a lot of issues with that (e.g. what happens if you're inside one
of those regions and type a letter. What would that do?).
I currently don't have a solution better than saying "Collapsed:
identifier", realizing that the string might have code before or
after that would be rather ambiguous. So, that's what I'm going to
currently go with. But if folks have something they think would be
more useful, I would love to hear it.
As always, thanks for whatever advice you're willing to give!
--Dante
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq