I am developing a grid with many rows and columns with accessibility compliant. I am facing few issues here...
The user can construct the geometric shapes inside the grid by clicking on each point. They can also drag each point to another location inside the grid.
I am thinking of making each point in the grid accessible using the tab focus. However, I am not sure how to announce to the user meaningfully when they try to construct the shapes in the grid (like when they reach a point in the grid, what should the screen reader say?) and how to make each point draggable and announce to the user?
Depending on what else is on your page, I would probably make the entire grid one tab stop and then use the arrow keys to navigate through the grid. It makes tabbing to other interactive elements on the page (links, buttons, checkboxes, etc) a little easier. If the entire page is made up of just the grid (ie, nothing else to tab to on the page), then you could probably use tab to navigate through the grid.
Assuming you go with the arrow keys to navigate, you could use shift+arrow to perform the actual move. So I could arrow right five times then arrow down once to get to your northern most point on your example. Then I could use shift+rightarrow to move that point to the right.
Alternatively, you could arrow to the point and go into an "edit" mode by pressing enter and then you wouldn't need shift plus the arrow key to move the point. You could just press an unmodified arrow. Pressing enter a second time could save the point change and toggle you back out of "edit" mode. escape should cancel the move.
Creating a new point could happen by pressing enter on an empty grid intersection.
As you arrow through the grid, you'd want to hear if there's an existing point at the intersection. If there's no point, then you don't need to announce anything other than the grid coordinates (row,col). If there is a point, then after the grid coordinate, say something like "point". If I start in the upper left and arrow right and then down to get to the eastern edge of the shape, you'd hear something like:
arrow right "1, 2"
arrow right "1, 3"
arrow right "1, 4"
arrow right "1, 5"
arrow right "1, 6"
arrow right "1, 7"
arrow down "2, 7"
arrow down "3, 7, point"
arrow down "4, 7"
arrow down "5, 7, point"
(Whether the upper left is 0,0 or 1,1 probably doesn't matter. Just pick one.)
As far as the role of the points, there isn't really a good built in role. A <button> comes close but doesn't imply you can move it around. This is probably a good case to use aria-roledescription. You might have to use the application role, which I rarely recommend, but you'll want all keyboard events to be sent to your grid rather than be interpreted by the screen reader. Without the application role, pressing the arrow keys would send the keyboard event to the screen reader which would read the next word or line on your page. Using the application role automatically causes the events to be sent to you (so you can have an event handler in JS).
If you don't use the application role, the screen reader user can still interact with your grid but they have to manually switch modes to do so. It's pretty easy to do but you'd have to notify the screen reader user that they need to switch.
I hope that's enough to get started.
Related
I want to implement keyboard navigation for tabulator table.
It should support up, down, left, right arrows and accordingly focus should move between cells and rows.
Basically I want to implement something like this
So by doing minimum changes how can I achieve this?
If the table contains read only data then it is not navigable, only editable cells can have focus in Tabulator.
If you have a look at the Editors Example you can see that if you give a cell focus you can then navigate around the table using the arrow and tab keys
I have been having issues with using the ScrollToAsync function of a ScrollView when running on Android, not tested on iOS yet.
I'm using Xamarin.Forms version 2.5.1.444934 using .Net Standard
Testing on the Android Emulator (8.0, API26) and a Google Pixel (8.1 API27), both have the same issue.
I use NavigationPage and Navigation.PushAsync to move between pages (therefore have navigation bars on every page).
I want to create an auto populate field control, the user types in the first few letters and I look up the results in a database / static list of string and display the results below for the user to click/tap.
I have this working using a composite control (the contents of the frame marked interesting below).
The problem I have is scrolling the view to show the results.
My page has this layout hierarchy:-
ContentPage
StackLayout
ScrollView
StackLayout
Frame (some label and entry fields inside a stack layout)
Frame (some label and entry fields inside a stack layout)
Frame (some label and entry fields inside a stack layout)
Frame (the interesting one that deals with scrolling)
StackLayout
Heading Label
StackLayout
Label x:Name="ScrollToLabel"
Entry x:Name="ScrollToEntry"
Grid x:Name="ScrollToGrid"
Entry x:Name="Hidden" Text="I should stay visible as you type"
/StackLayout
/StackLayout
/Frame
Frame (some label and entry fields inside a stack layout)
Frame (some label and entry fields inside a stack layout)
/StackLayout
/ScrollView
StackLayout
Button Text = Done
/StackLayout
/StackLayout
/ContentPage
When the user clicks/taps in to ScrollToEntry, the keyboard opens and pans the control to above the keyboard (ok so far).
When the user starts typing in ScrollToEntry, the code populates ScrollToGrid with up to 5 results.
At this point I want to make sure that the grid results are visible for the user to tap on.
I have tried 2 different options, ScrollToAsync(ScrollToLabel, Start) and ScrollToAsync(Hidden, MakeVisible).
Neither work as I would like 100% of the time.
ScrollToAsync(ScrollToLabel, Start)
If the ScrollToEntry is at the bottom of the screen, the navigation bar is hidden and the view pans up too far.
The ScrollToLabel is now off the top of the screen.
When the second letter is clicked/tapped, the Navigation bar is restored and the scroll scrolls correctly, ScrollToLabel at the top of the screen.
If the ScrollToEntry is near the top of the screen, the navigation bar is not hidden and it scrolls correctly.
ScrollToAsync(Hidden, MakeVisible)
This is my preferred option because it would only scroll as far as needed to display all the results (not all the way to the top).
This works even worse than the first one.
In most cases, it does not scroll at all, I assume it thinks it already visible but is actually behind the keyboard?
If it does scroll, the label Hidden is still not displayed (I tested with both a HeightRequest="0" version and a visible version, both the same result).
I tried using the below code to change the adjust to resize.
Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
2 issues,
1. Because it resizes, the Done button now is above the keyboard, taking up space.
2. When clicking the hardware back button (not the done or navigation back button) the previous view now has a white space where the keyboard was.
If using the done or navigation back, the screen initially appears with the white space but then refreshes to full screen.
I have created a sample app that highlights the issues (by default using pan, not resize).
It's the most simple version of the layout I'm using...
Am I doing something wrong or is this just how it works? If its how it works, this must be a bug? If I'm doing it wrong, can someone tell me what or suggest a different way of doing it?
I´m working on a tool only for tablets (Android, iPad) based on Cordova and jQuery Mobile (1.4.5). In the first phase of this tool, many of the users who have to work with it were asking for some more comfort regarding the behavior of the form popups.
The problem was:
As a user came to one section, I provided him with a collapsible-set, consisting of sub-sections. In this sub-sections, the user gets data-grids with Add, Edit and Delete buttons next to each data-set.
So, as the user tapped on Edit button (or Add), I opened up a popup with the necessary form and form-elements to edit this data-set or add new data to the database. But in many of the upcoming popups the amount of the form-elements is as high, so the popup appears higher or even much higher then the collapsible-set (including the data grid) behind the modal popup is.
The popup of jQuery Mobile is centered by default and even if I positionTo origin and pass x and y coordinates to it, the library/widget wants to position the popup to this coordinates by the center point, rather then the upper left corner.
Users always had to scroll around to come to the start point of the form and after submitting the form, they had to scroll up again to where they tapped on the button to open the popup.
Now I tried to do everything I could imagine, to force the popups top position to 20 pixels below the top position of the visible area on the tablet, regardless of where I am, when tapping on any Edit or Add button.
I was playing around with offset() (window.pageYOffset), etc. and set the position of the popup by:
popup2open.popup('open').css({'top':popupTopValue+'px','left':popupLeftValue+'px'});
In fact, the popup is positioned to exactly where I want it, if the top offset is between 0 and 100. On all values above 100, the top position of the popup increases by absolutely incomprehensible value. The only consistent fact is, that the more I scroll down before I tap on a button, the more this value increases - so it does not in/decrease by random.
(BTW: I found out that I have to set "popupLeftValue" to 0, so the popup is positioned in the center horizontally.)
I just can´t see any regularity on increasing value...
Can anybody give me a hint or a punch to the right direction?
Thank you in advance!
PS: I experimented also with .css({'position':'[fixed|absolute]','top':popupTopValue+'px','left':popupLeftValue+'px'}); and that worked well. Only to find out one show-stopper: If I set the focus to an input-field inside the form and than closing the virtual keyboard on the tablet, a reposition-event is triggered and by this, the popup is re-positioned massively below the former position (in fact around 300 pixels below and just marginalized to the right border of visual area). The Cancel and Save buttons are even out of scroll-able area.
(some more funny fact, btw.: if I set the focus to the same input-field, than not closing the virtual-keyboard but directly setting the focus to a select element and after this pressing the back button of the tablet to escape the select menu, no reposition-event is triggered...!?)
On 18th of July 2013 Gabriel Schulhof added this line to a feature-request from one user, who asked exactly for what I´m struggling around with:
"We are indeed considering adding such a feature..."
I am trying to create a specific solution for weeks now and I have tried many things but I am just not sure if it is possible at all to achieve. I need your opinions and point me in direction o a correct approach. Following what I am trying to create:
Initially there is a tile layout in which a certain number of cards (say 12) are placed in 4x3 grid:
Now, if user clicks on a tile (Box 3), the state changes to following:
Selected tile is expanded and other tiles get aligned one below another on the right side:
Challenge is that I want to create a transition from every tile's initial state to the state where every tile is aligned one below another on the right. At the same time, when a tile is clicked it is expanded in place.
Note - there are no sudden change in positions, no reload of page and preferably no JS (I wanted to write a CSS-only solution). Everything smoothly animates to new position. From the second screen if a different tile is selected (from right), then the expanded item will shrink and go in to the right hand stack while the selected item will expand and take place of the currently expanded (B3).
If you could just point me to correct direction it would be great help.
thanks.
You should check css flexbox.
Using the "order" proprety, you could asign order of every box from 2 to 8,
and each time a box is selected, you change it's order to 1 and you also change its size and colour.
However, I don't think you can use 'click' actions with css only.
I would recommend using JS for what you are trying to achieve.
Hope it helps
I'm trying out both DockFX (https://github.com/RobertBColton/DockFX) and AnchorFX (https://github.com/alexbodogit) (using Clojure as the host language, in Win7 x64)
The nice thing about DockFX is that you can drag from the tabs, and set the title bar to NULL to make the pane non-draggable, but the DockingPane still allows siblings next to (which is ok), or on top of (which is not okay) the non-draggable DockNode, leaving a skinny little section of tab representing the non-draggable node when another pane is dragged on top, as shown here. This is what it looks like when a non-draggable TableView gets a TreeView dragged on top.
Question for DockFX:
How to prevent things from being dragged on top of a non-draggable DockNode, so I don't see a skinny vestigial tab?
For AnchorFX, I like how you can create substations, etc., and it feels a little snappier (actually about 1/10th the time to create a Station compared to DockFX). I modified the code so a null title removes the title bar and makes the node non-draggable.
Questions for AnchorFX:
How to prevent things from being dropped on top? (next to is okay).
How to eliminate title bar when a node is tabbed on top of other nodes?
How to drag from tab instead of title bar?
I modified the DockFX code so the popup does not appear if the DockTitleBar is null.
Inherently fixed by above.
Already works with DockFX, haven't tried fixing this with AnchorFX.