Code Monkey home page Code Monkey logo

maidr's People

Contributors

ellvix avatar github-actions[bot] avatar jooyoungseo avatar saaivenkat avatar sandeep-ps avatar sehilyi avatar semantic-release-bot avatar sk-143381 avatar y-yujun avatar yilinxia avatar yujuny2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

maidr's Issues

Help menu: document role does not take any effect

When help menu is displayed, "document" role must work as tagged to activate screen readers' virtual cursor (AKA browse mode). However, currently it does not take any effects. Usually, assigning tabindex 0 with "document" does the trick, but it does not work this time. Probably, it inherits from "dialog" ARIA role, but it was not the issue b/c removing the "dialog" did not make it work.

Move all the keydown events to svg-level instead of the whole document

I know there is a tradeoff, but please bind all the keydown events to svg units instead of the whole document. Because we will likely embed more than one graph on the same page and the document-level key bindings can cause some issues. We may want to isolate them within an SVG object.

Scatterplot: autoplay does not kill the previous instance

Reproducible Steps

  1. Open scatterplot.html.

  2. Focus in the graph area.

  3. Hit page-up key to go to the second layer (the smoothed line).

  4. Press Ctrl+Shift+Left-Arrow to autoplay.

  5. While the autoplay is working, press Ctrl+Shift+Right-Arrow to play the other direction: two autoplays get played at the same time.

Expected Behavior

The last autoplay needs to kill the previous autoplay job.

Number of outlier: indicate number consistenly

  1. When the number of outliers is 1, the current method is just omitting the number; however, please indicate the number like below:

1 Lower Outlier 126.18

  1. For empty outliers, please do the following:

0 Out Lier

[boxplot] The outlier number needs to be appended after class name

While addresing #61, please also fix the following issue.

Reproducible Steps

  1. Open boxplot.html

  2. Press arrow keys to go to upper outlier area of suv.

  3. Hit down-arrow key: You will see:

2 subcompact Upper Outliers 590.97, 639.05

This needs to be fixed as:

subcompact, 2 Upper Outliers 590.97, 639.05

  1. In the current location (upper outliers of subcompact), hit up-arrow key: You will see:

5 suv Upper Outliers 302.48, 318.51, 334.53, 350.56, 366.59

This needs to be fixed as:

suv, 5 Upper Outliers 302.48, 318.51, 334.53, 350.56, 366.59

Boxplot braille pattern algorithm

After multiple experiment on my end, I have found that double lines are more pronounced. The following includes my suggested logics. I will share more ideas on some thresholds.

left_boxside = median - Q1

right_boxside = Q3 - median

if (left_boxside == right_boxside) {
    box_brl = "⠿⠸⠇⠿"
} else if (left_boxside < right_boxside) {
    box_brl = "⠿⠸⠇⠿⠿"
} else {
    box_brl = "⠿⠿⠸⠇⠿"
}

lower_whisker_length = Q1 - min
upper_whisker_length = max - Q3

if (lower_whisker_length == upper_whisker_length) {
    "⠒" + box_brl + "⠒"
} else if (lower_whisker_length < upper_whisker_length) {
    "⠒" + box_brl + "⠒⠒"
} else {
    "⠒⠒" + box_brl + "⠒"
}

Boxplot cursor location is not preserved

In boxplot, changing group refreshes the cursor location, defaulting to min area instead of preserving the current stat area. For example, if the current cursor is at 25% of group A, users may expect to land in 25% of group B when they press down arrow key.

Need repeatable null sound

We currently use min frequency, and sometimes custom tweak the oscillator type, but we should have a unique repeatable null sound used everywhere that we can tweak to improve UX.

[Future plan] Publish our library to NPM

While hosting our project on GitHub, we may want to publish our solution to NPM as an open-source library at some point so that people can download and import our library.

Give the total number of outliers

When landed in either lower or upper outlier region, it would be great to announce the total number of outliers like below:

{total_number} upper outliers: . . .

Making heat map accessible

I have pushed a heatmap svg sample file at accessible-graphs/static/heatmap.svg.

With this sample file, please make a heatmap.html file just like accessible-graphs/barplot.html:

  • Visual highlight moves along with left/right/up/down arrows.

  • Play audio tone that addresses the following

    1. left and right stereo panning for x-axis.

    2. Similar to left and right panning mode, make sound moves along up and down (not the pitches, just the spatial audio) along with y-axis.

    3. different pitches for values (higher pitch for higher value; lower pitch for lower value).

Server setup

For the log tracker feature, we need to host a server. I will take care of this.

[Boxplot] Redundant group label is spoken even in terse mode when braille is on

Reproducible Steps

  1. Load NVDA or any screen reader.
  2. Launch boxplot.html.
  3. Tab to focus on the svg area.
  4. In terse mode, move your point by pressing left and right arrows: You don't hear group label, which is correct.
  5. This time, however, press b to activate braille mode and do the same thing (pressing left or right arrows): You would hear redundant group label even though it's still in terse mode.BB

Better word choices for boxplot stats

CC @ellvix and @yilinxia

I suggest we reword the following terms in boxplot:

  1. Minimum -> Low

  2. Maximum -> High

This is because these terms are misleading. The ending points of left and right wiskers actually are not matched with data min and max values.

Here is a formula how low and high (i.e., the ending point of both wiskers) values are calculated:

  • High: $(IQR * 1.5) + Q3$

  • Low: $(IQR * 1.5) - Q1$

Outliers are any values outside either low or high values.

Braille display is one cursor after sound pitch

The braille display works nicely. Great job! The only issue I have found is that the braille cursor locations are not precisely coupled with its corresponding sound pitches. When I press left and right arrows, cursor location moves along with braille columns. However, this cursor location is one column after its corresponding sound. For example, The highest tone/y_value in our sample svg file is at the far right. This pattern is also represented in braille unicode, but I here the highest tone when my braille cursor is one column after the target location.

Log tracker

As we discussed today, please implement an event-driven log tracker.

  • Log tracker needs to get started as a page is loaded.

  • We may want to bind log tracker to each SVG object.

  • Default log file format: JSON

  • Use F10 to bring up "Save As" dialog box for exporting log file.

  • Use sessions and cookies to address multi user access.

  • In our user studies, we will embed each plot in separate pages, which means we may need to append multiple log data from the same user agent until they explicitly press F10.

  • Structure (please feel free to add more if any):

  1. graph type

  2. timestamp

  3. keystroke

  4. current modes (BTS)

  5. misc settings (like custom frequency range, volume, braille display size, etc)

  6. current position on chart

  7. user OS platform info

  8. user browser and version

Heatmap braille cursor tethering issue

Reproducible Steps

  1. Open heatmap.html.
  2. Tab to focus on svg area.
  3. Turn on braille mode by pressing b.
  4. Place your cursor in the second column in any row.
  5. Press up arrow to go to the row 1 and column 2.
  6. Press up arrow again to see if the cursor moving is blocked or not: currently, the cursor goes to the row 1 and column 1 instead of stopping there. This issue can be found when you reach the row 3 and column 2 and press down arrow key. Instead of stopping there, your cursor will move to the right (row 3 and column 3 location).

Add ctrl+home and Ctrl+end key commands

Also CC'ing @ellvix

We need Ctrl+Home key for going to the very first element and Ctrl+End key for going to the very last element in graphs. This is useful for two-dimensional graphs, such as heatmap and boxplot. However, please make these keys work for other types of graphs including barplot and scatterplot as a general solution. I know, in barplot and scatterplot, these keys' behaviors would be exactly the same as Ctrl+LeftArrow and Ctrl+RightArrow, but we need to make this generalizable so that we can be prepared for any types of graphs going forward.

Work on new (no jittered) scatterplot svg

@yujuny2 -- I have just uploaded the following scatterplot SVG:

  1. scatterplot/scatterplot_no_jitter_point_only.svg

  2. scatterplot/scatterplot_no_jitter_with_bestfit.svg

Please work on these files instead of the old one because these did not use jitter noise. The only difference between 1. and 2. is whether there is an added best line or not.

FYI, the backend raw data that I previously provided in json format as well as HTML are still valid because I created them without jitter noise at that time. I guess this no jittered SVGs would be more similar to the raw data.

Turn off braille when losing focus

It would make more sense that we turn off braille mode when it loses its focus. Could you please add event handler to the braille div for "focusout" event?

Start oscillator when svg object gets focused instead of spacebar keydown

Currently, oscillator play is triggered via spacebar keydown event. This would cause some issues when there are multiple SVG plots included on the same page. After addressing #2, please modify this in the following ways:

  1. Add tabindex="0" attribute to each svg objects via setAttribute() method.

  2. Make oscillator event handler work against focus event (when the current SVG object gets focused) instead of spacebar keydown event.

Implement sound volume weight

I have finally been able to do reverse-engineering jobs to obtain the real data for both point and smoothed line layers within scatter plot. Please use the following data for scatter plot.

  1. Point layer (I know you already used the raw data for point values, but this is the exact one. Please replace): scatterplot/layers/point_layer.json

  2. Smoothed line layer: scatterplot/layers/smooth_layer.json

Please note: if there are multiple values on the same spot, use the larger volume to indicate the weight. For example, let's say there are x: 2, y: 4 and x: 2, y: 4 (the same values on the same spot). Sighted people would see them thicker, but blind people cannot see them. Therefore, please use larger volume parameter as a way of weighted value.

Regression: Focus does not go back to original position after braille is turned off

I think this is an inadvertent regression after we patch aria role bound to SVG element.

Reproducible Steps

  1. Open any graphs, such as boxplot.html or barplot.html

  2. Tab to focus in SVG object.

  3. Press arrow left and right to move around.

  4. Press B to turn on braille mode.

  5. Turn off braille mode by pressing B key.

  6. See if your focus goes back to your original position: it does not.

  • Notes: we still need to bind application role and tabindex to SVG object instead of its parent div container because chances are we may embed more than one SVG object on the same web page.

Mac / PC switcher

For Mac / PC switcher: use navigator.platform or scrape from navigator.userAgent, because navigator.userAgentData.platform does not exist on all browsers (only exists for Chrome and Edge).

Smooth audio

Investigate smooth audio for scatterplot curve. Try AudioParam.setValueCurveAtTime()

Boxplot: focus moving is unstable

When navigating a stat vertically across groups, sometimes focus goes to another stat category.

Reproducible Steps

  1. Open boxplot.html

  2. Focus on low (AKA minimum) of "suv"

  3. Keep pressing down-arrow keys (autoplay does not have this issue so please test with manual arrow keys).

  4. If you reached the low of "2seater" without any issues, keep pressing up-arrow multiple times to go back to the suv low.

  5. Repeat this up and down round trip multiple times: you may notice that your focus sometimes moves to lower outlier group out of the blue.

Add event handler to svg object instead of window

Currently, all the keydown events and their corresponding event handlerss are bound to window object. This is a great start. However, what if there are more than one svg objects contained in the current web page? addEventListener() will be triggered against when the whole browser window is loaded. Probably, a better approach would be binding these events and handlers to svg object unit instead of the window object. This way would allow users to interact with any number of svg objects in the current window.

Boxplot verbose mode bugs: unmatched plural verbs and incorrectly appended the number of outliers

1. Singular and plural are flipped around.

If you turn on verbose mode and navigate "suv" lower and upper outliers, you would hear/see the following:

Lower Outliers are 126.18

5 Upper Outlier is 302.48, 318.51, 334.53, 350.56, 366.59

First, the plural and singular verbs are unmatched with the the number of outliers.

Second, no information on the number of "lower outlier". Currently, it displays as:

Lower Outliers are 126.18

However, the expected outcome would be:

1 Lower Outlier is 126.18

2. The number of outliers are incorrectly appended in verbose mode

  1. In verbose mode, go to upper outlier area in "suv"

  2. Arrow down to focus on the upper outlier of "subcompact": you would hear and see the following:

class is subcompact, Upper Outlier2 is 590.97, 639.05

However, the expected outcome is as follows:

class is subcompact, 2 Upper Outlier are 590.97, 639.05

Generalize autoplay speed controls for all graph types

Currently, the autoplay speed controls (faster and slower) only work for scatterplot; however, please make this work for all types of graphs we support.

Also, please replace the current shortcut keys with the following:

  • Faster: period key (.)

  • Slower: comma key (,)

[Future plan] Integration with Chart2Music

At some point in the near future, we need to integrate our interface with Chart2Music. To do this, we need:

  • Create a JSON-looking general API like C2M that does not necessarily depend on visual formats.

  • Allow users to fall back to C2M for any graph types we don't support, such as candlestick plot, band plot, etc.

General autoplay bug: current position is always triggered in text mode

In any graphs and in any position, press CMD+Shift+LeftArrow or CMD+Shift+RightArrow to start autoplay.

When autoplay is on, text mode needs to be muted so that our users only hear the sonification sound. However, autoplay triggers the current position in text output. Please turn off the text mode as soon as the autoplay key is pressed and turn it on again right after the autoplay is finished.

[Boxplot] Redundant group label is spoken even in terse mode when braille is on

Reproducible Steps

  1. Load NVDA or any screen reader.
  2. Launch boxplot.html.
  3. Tab to focus on the svg area.
  4. In terse mode, move your point by pressing left and right arrows: You don't hear group label, which is correct.
  5. This time, however, press b to activate braille mode and do the same thing (pressing left or right arrows): You would hear redundant group label even though it's still in terse mode.BBeeee

Autoplay has about one second lag

Autoplay response speed is a little bit slow. I think there is about one second lag to respond after pressing autoplay keys (Ctrl+Shift+LeftArrow or Ctrl+Shift+RightArrow). We may want to make the response rate faster.

Mac controls and a switcher condition

Add Command + key for mac, mirror current Ctrl + key for PC controls.

Try using navigator.userAgent or navigator.platform to detect OS and switch both controls for all plots, and key control info on help menu.

[Future plan] Move to Typescript

In the long run, we need to switch the current project into Typescript for better scalability, compatibility, and maintenance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.