Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an accessible git askyesno and use is in git update-git-for-windows #234

Merged
merged 3 commits into from
Mar 1, 2019

Conversation

dscho
Copy link
Member

@dscho dscho commented Mar 1, 2019

It was reported in git-for-windows/git#2099 that our updater is not accessible, but what is actually not accessible is that Tcl/Tk script we use to ask the question.

This is (sadly!) the first time I was made aware that this script, that we introduced a long, long time ago, makes it hard/impossible to use with screenreaders.

Let's fix that.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

@sukiletxe please do have a look.

Here is a build of the new executable:
git-askyesno.zip

Just like git gui--askyesno, it has the command-line usage git askyesno [--title <title>] <question>, and it returns exit code 0 upon Yes and 1 upon No.

Can you please test this and verify that it is accessible?

@dscho dscho assigned dscho and unassigned dscho Mar 1, 2019
@dscho dscho requested a review from kgybels March 1, 2019 14:49
@rimrul
Copy link
Member

rimrul commented Mar 1, 2019

This is starting to be a thing that I'm working on preparing a PR and you're slightly faster, isn't it? Well, guess I'll review it.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

@rimrul sorry!!! ;-)

Copy link
Member

@rimrul rimrul left a comment

Choose a reason for hiding this comment

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

Looks good overall. There are some functional changes compared to the TCL version, but no real issues

@rimrul
Copy link
Member

rimrul commented Mar 1, 2019

You had better equipment this time round anyways. I couln't have compiled the WinAPI parts atm.

@sukiletxe
Copy link
Contributor

I confirm it works correctly. Thank you very much!

@sukiletxe
Copy link
Contributor

Though I believe -h was previously supported, and now it isn't, but that's minor of course.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

Though I believe -h was previously supported, and now it isn't, but that's minor of course.

You mean in git gui--askyesno? No, that was not supported.

This PR won't change what git update-git-for-windows -h shows, that will still work.

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

I confirm it works correctly.

@sukiletxe thank you!

@dscho
Copy link
Member Author

dscho commented Mar 1, 2019

Maybe the proper approach would be a third return code for errors

Indeed. If it wasn't for existing callers. We ship git gui--askyesno for years, and I really feel bad to find out that it is not accessible, only now. I want it to be a no-brainer for every user to switch to git askyesno.

dscho added 3 commits March 1, 2019 17:24
This is a drop-in replacement for `git gui--askyesno` that is hopefully
accessible out of the box.

Signed-off-by: Johannes Schindelin <[email protected]>
We are trying to come up with a drop-in replacement for `git
gui--askyesno` because that command is not accessible (read: a screen
reader cannot make sense of it).

To make it a true drop-in replacement, we also need to imitate how `git
gui--askyesno` accepted multiple command-line parameters and simply
joined them into a single string.

Signed-off-by: Johannes Schindelin <[email protected]>
When we ask whether the user is ready to install an update, we use a
graphical popup. So far, we used `git gui--askyesno`, which was
convenient because it was small, and we ship with Tcl/Tk anyway.

However, that GUI helper is not nice to screen readers, making it
inaccessible.

We just introduced a drop-in replacement that is accessible, let's use
that one instead.

This fixes git-for-windows/git#2099

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the accessible-git-askyesno branch from 4e80662 to 80f5a6a Compare March 1, 2019 16:30
@dscho dscho changed the title [DO NOT MERGE YET] Provide and use an accessible git askyesno Provide an accessible git askyesno and use is in git update-git-for-windows Mar 1, 2019
@dscho dscho merged commit 1946d74 into git-for-windows:master Mar 1, 2019
@dscho dscho deleted the accessible-git-askyesno branch March 1, 2019 19:23
dscho added a commit that referenced this pull request Mar 1, 2019
Git for Windows' updater [is now
accessible](#234),
i.e. it can be read by a screen reader.

Signed-off-by: Johannes Schindelin <[email protected]>
rimrul added a commit to rimrul/build-extra that referenced this pull request Aug 14, 2021
This is a drop-in replacement for `git gui--askpass`. Since we added an
option to use an external `ssh` found on the `PATH` (git-for-windows#367) we'll need an
`askpass` implementation that can be called by any windows application even
without understanding shebang lines. `git gui--askpass` probably also has
the same problems with screenreaders that `git gui--askyesno` had(git-for-windows#234), so
we'll likely get improved accessibility as a positive side-effect.

Signed-off-by: Matthias Aßhauer <[email protected]>
rimrul added a commit to rimrul/build-extra that referenced this pull request Aug 14, 2021
This is a drop-in replacement for `git gui--askpass`. Since we added an
option to use an external `ssh` found on the `PATH` (git-for-windows#367) we'll need an
`askpass` implementation that can be called by any windows application even
without understanding shebang lines. `git gui--askpass` probably also has
the same problems with screenreaders that `git gui--askyesno` had(git-for-windows#234), so
we'll likely get improved accessibility as a positive side-effect.

Signed-off-by: Matthias Aßhauer <[email protected]>
dscho pushed a commit to rimrul/build-extra that referenced this pull request Aug 14, 2021
This is a drop-in replacement for `git gui--askpass`. Since we added an
option to use an external `ssh` found on the `PATH` (git-for-windows#367) we'll need an
`askpass` implementation that can be called by any windows application even
without understanding shebang lines. `git gui--askpass` probably also has
the same problems with screenreaders that `git gui--askyesno` had(git-for-windows#234), so
we'll likely get improved accessibility as a positive side-effect.

Signed-off-by: Matthias Aßhauer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants