One of the tasks I've been doing at work is looking at what it will take to bring our software into compliance with the latest accessibility standards, specifically http://www.w3.org/TR/wcag2ict/ which seems to be one of the standards which many countries will be adopting in their acessibility laws & regulations for non-web based technologies like X programs.
Currently I'm concentrating on the guidelines for interacting with programs from the command line and how well we comply with these two rules in particular: 3.3.1 If an input error is automatically detected, the item that is in error is identified and the error is described to the user in text. http://www.w3.org/TR/wcag2ict/#minimize-error-identified 3.3.3 If an input error is automatically detected and suggestions for correction are known, then the suggestions are provided to the user, unless it would jeopardize the security or purpose of the content. http://www.w3.org/TR/wcag2ict/#minimize-error-suggestions Besides being useful for accessibility, these are also good usability rules. For command line parsing, we're currently interpreting these roughly as: 3.3.1 - Don't just spew usage message, say which option was wrong & why. 3.3.3 - But still include the usage message as a suggestion for what the right syntax is. Unfortunately, many of the X apps aren't doing a good job of meeting them yet, and the many ad hoc parsers in X mean we can't just count on getopt doing it for us. This patch series starts applying those to the CLI option handling in the X apps, at least a first batch I've gotten through so far. While I'm in there I have done some other cleanups, as well as continuing to propogate the addition of flags to print the package version so it's easier for users to include in bug reports. There's many more to go, but I figured I'd send this batch now in case anyone had feedback about changing direction before I went further. appres: Print which option was in error along with usage bdftopcf: Print which option was in error along with usage bitmap: Print which option was in error along with usage fslsfonts: Add -version option to print version Print which option was in error along with usage fstobdf: Spell out -server in usage message to match man page Print which option was in error along with usage Add -version option to print version Print error and usage on invalid arg, instead of ignoring it iceauth: Actually print command list in usage message Fix "noexistent" typo in error message Add -V flag to print version Print which option was in error along with usage mkfontscale: Add missing newline to usage output Add -v flag to print program version Make usage() always exit(1) Print which option was in error along with usage appres/appres.c | 5 +++- bdftopcf/bdftopcf.c | 2 + bitmap/atobm.c | 26 +++++++++++++++++------ bitmap/bmtoa.c | 8 ++++++- bitmap/configure.ac | 2 - fslsfonts/configure.ac | 2 - fslsfonts/fslsfonts.c | 44 ++++++++++++++++++++++++++++++---------- fslsfonts/man/fslsfonts.man | 3 ++ fstobdf/configure.ac | 2 - fstobdf/fstobdf.c | 40 +++++++++++++++++++++++++----------- fstobdf/man/fstobdf.man | 6 +++++ iceauth/iceauth.c | 24 ++++++++++++++++----- iceauth/man/iceauth.man | 2 + iceauth/process.c | 2 - mkfontscale/configure.ac | 2 - mkfontscale/man/mkfontscale.man | 5 ++++ mkfontscale/mkfontscale.c | 44 +++++++++++++++++++++++----------------- 17 files changed, 158 insertions(+), 61 deletions(-) -- 1.7.3.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel