Accessibility issues in Table view cell subviews - ios

I've been straggling with this issue for a while.
I have a table view cell, when selected, a subview containing some buttons is added to the cell.
Those buttons are not accessible via Voice Over.
Does anyone know how to solve this issue?
Thanks!

This is not so much of a coding answer but...
You should be fine with what you got.
Safari and Mac VoiceOver can click buttons and links when focus is on a cell. Chrome and VO on the otherhand can not, but if you are a VO user you know that you might have to "interact" with some elements to reach a deeper interactive element. So if you use QuickNav and arrow Left + Down you can press the button in Chrome.
Tested with this code:
<table id="theTable">
<thead>
<tr>
<th scope="col">Hey push it</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<button type="button" id="pushMe">Push Me!</button>
</td>
</tr>
</tbody>
</table>
and a lite jQuery to se if somethings happend:
$('#pushMe').on('click',function(e){
$('#theTable').css('background','red');
});
Test for yourself on CodePen: Screen Reader and Table test

Related

Angular Animations apply conditionally

I applied fadein effect of Angular-Animations to my Angular project based on ASP.NET, and display only the first row faded-in. However, the other rows are not displayed when using *ngIf as shown below:
<ng-template pTemplate="body" let-row let-i="rowIndex">
<tr *ngIf="i==0" [#fadeInOnEnter]>
<td>
<a [routerLink]="['/detail/']">{{ row.Summary }}</a>
</td>
</tr>
</ng-template>
I know that else can be used in this situation, but I do not want to repeat lots of <td> blocks omitted in this example. So, is there a way to display animation only if the condition is true in *ngIf field and display the same block without animation.
Can you just apply the condition to the animation?
[#fadeInOnEnter]="i == 1"

Unwanted padding in table cell

I have a web page that does not appear as it does in design view. It adds padding around table cells with text boxes in, but nowhere else. I want it without the padding.
This is the html:
<asp:Panel ID="PlayerPanel" runat="server" BackColor="#3333CC">
<table id="PlayerTable" style="width:100%;" border="0">
<tr>
<td >Name</td>
<td><asp:textbox id="txtPlayerName" runat="server" Width="400px" AutoPostBack="True"></asp:textbox></td>
</tr>
<tr>
<td >Mobile</td>
<td><asp:textbox id="txtPlayerMobile" runat="server" Width="400px" AutoPostBack="True" ></asp:textbox></td>
</tr>
<tr>
<td >Email</td>
<td><asp:textbox id="txtPlayerEmail" runat="server" Width="400px" AutoPostBack="True"></asp:textbox></td>
</tr>
</table>
</asp:Panel>
In design, it appears without padding. When running, it appears with padding above and below the textbox of about the same height as the textbox.
I have tried setting "padding:0px;" for the panel, the table and the cell, but it still stays the same. What else can I try?
Maybe it's cellpadding directly on the table? look here; try setting that to 0
Maybe it's the browser itself putting some default styling on it - in Chrome, open up inspector (F12 or right click -> inspect element) and there you can see what's being applied to the element.
I found this fix:
p {
margin: 0;
padding: 0;
}
I added this into the css and it fixed the problem. It is one of those 'Well, duh!' solutions.

How to focus on a particular row in jquery

I have a grid in my module. In this grid the first column "Vessel Name". In the vessel name is present in a alphabetical order. If I click any one of the vessel, one popup will open. After closing popup the grid is not refreshed properly. And the last data is present in first. I need to scroll.
So what I need is, After closing popup I need focus on the clicked vessel. How can I do this. I have more than 30 data in a grid. Based on rowIndx how can I achieve? Please help me.
Considering your table strucutre
<table class="grid-class">
<tr>
<td>ele 1</td>
..
<td>ele X</td>
</tr>
<tr class="active"> // the one you clicked,set active to this and remove to all other
<td>ele 1</td>
..
<td>ele X</td>
</tr>
</table>
Firstly set a css(write your css based on your need) class active which highlight the row.Then try something like-
$(document).ready(function(){
$('.grid-class tr').click(function() {
$(this).sibling('tr').removeClass('active');
$(this).addClass('active');
});
});

jquery UI button on checkbox

i have such a checkbox and i whant to turn it into jquery ui checkbox to look the same on all browsers.
<tr>
<td valign="middle" class="ck"><input name="perk-senior" id="senior" type="checkbox" value="4" checked /></td>
<td valign="middle"><div class="text">Show available plans for senior</div></td>
</tr>
but after i use
$('#senior').button()
the checkbox just disappears. I tried adding jqueryui icons, and removing css, it gives the same effect.
how can i make it into a standard checkbox with a tick icon on toogle?
Should that not be:
$('.ck').button()
Or:
$('#senior').button()
You've selected the entire containing div and not the checkbox itself (presuming that the table is nested within a div named #search).

Horizontal scroll on a table in a div (HTML, jQueryMobile)?

I need to put a horizontal scroll on the following situation to be able to scroll photos(I use jquery mobile and need to run the program on android), any idea ? thanks
<div data-role="content" class="List" >
<table>
<tr> <td>image1</td> <td>image2</td> <td>image3</td> <td>image4</td> </tr>
</table>
</div>
For scrolling you could use something like this
http://code.jquery.com/mobile/latest/demos/experiments/scrollview/
http://code.jquery.com/mobile/latest/demos/experiments/scrollview/scrollview-direction.html ( Horizontal Scrolling )

Resources