How to layout aspx page that looks like a paper form? - asp.net

I've been developing desktop aps, so my aspx/html got a bit rusty. What I need to do is layout an aspx page with fields that look something like this (there are many fields, this is just an abstraction):
Basically, the items look like they are in rows, but not in distinctive columns (e.g. in my example, street name doesn't have to allign with street number etc...)
I want to achieve maximum compatibility with browsers - what would be best to use for this scenario? Tables, list items... divs? something else?
I'm using aspx C# 4.0.

Here's a non-table example:
http://jsfiddle.net/eRY8T/7/
The conventional wisdom is that table should be used for displaying data in tabular format, not for laying out forms.
In practice I think it is sometimes easier to use tables for forms - but this is typically when your form looks like tabular data (e.g. one column for labels, another for inputs).
In your situation, I think using divs is actually easier than tables would be. This would probably require lots of rowspan/colspan/nested tables to get right.
The other advantage of using a CSS based layout over tables is that the tab order will probably make more sense. In the example, notice how tab goes through the first column then the 2nd one. In a table it would go through every input on a given row before moving to the next row.

How about Table with 4 Rows and 7 Columns
and use corresponding colspan for better alignment.

Related

How to make HTML table/grid accessible with controls outside the table

I am challenged to make an HTML table/grid accessible, which offers the user the possibility to select a row and perform an action on the selected row.
The following link gives an example, on how everything shall look like (without accessibility):
https://alejandro.app.fi/crud-ui-demo/simple
My problem is:
How do I make the buttons on top of the page, for performing the action on the row, accessible? How can I get the screen reader to announce the part, so that the user is able to interact with it?
In my opinion it would be a bad idea, to let the screen reader read something like "To edit this row tab back xyz times and use the buttons above the table"
I searched through the wai-aria and was hoping to find something like a "connector" to give the screen reader a connection to these buttons at the top, but could not find anything, that would fit.
Is this a bad pattern, with which I want to work with? Or how can this be solved?
A large table with internal selectability and external editing controls is inherently difficult to use, even without any disability.
Large tables are hard to get intuitive information from.
Wide tables or tables viewed in narrow windows require horizontal scrolling.
Selectability tends to be confusing, because you are focused on a cell, but when you select it you might want to select it, its row, or its column, so you need a way to distinguish these three kinds of selection. Also, it is not obvious whether selection automatically follows focus or requires a separate action.
External editing controls are distant from much table content, so when you are looking at the controls the selected row may be out of sight, making you forget which row you selected.
Screen readers have poor support for tables and often give wrong header information about cells.
If you asked what users wanted, most probably would not tell you they want to see hundreds of alphanumeric facts arranged in a grid. For editing data, most users might want (1) a way to find the desired data and (2) a way to edit those data. Displaying all the data in a table is unlikely to be a user-friendly method for achieving either #1 or #2.
Clever rendering methods may fail under common conditions. For example, above the cited table is a horizontally scrollable top list of table types. On a narrow device, the right end of the list cannot be scrolled into view.
In principle, tables can be WCAG-accessible. In practice, tables, especially if large, complex, or operable, are usually inferior to other solutions in usability and accessibility.

Semantic UI, difference between table and grid?

I'd like to create a multiple rows + multiple columns view.
I think I can either use table or grid.
Which one should I use over another and why?
Summary
Grid
Using a grid makes content appear to flow more naturally on your page.
Table
A standard table.
from Semantic-UI
Explained
Grids
The CSS Grid Layout specification is one of a few new specifications
that are redefining how we approach layout for the web. Alongside
Flexbox and the Box Alignment Module it will become part of a modern
layout system for websites and web applications.
from Grid by Example
Table
Table is just a layout, and could be complex for complex views. Just think in spreadsheets. You can merge columns and rows to get your layout.
Opinion
You can use the option you want, according to your needs. But if you are looking to organize your web content, use grids; If you need to deploy data use tables.
That all depends on the requirement. for example, If you want them to maximize the use of the page; maybe for a report with multiple columns over the whole webpage and you knew beforehand on what device your page would be rendered then use a table because you can pinpoint each and every column to exact pixels.
But if the rendering device might be any device or the rendering device info is not available then use grid because it would automatically adjust to the available layout space.

How to make table cell page brake in Novacode?

I need to make one big table and the cell does not start at a new page,
so one cell will be on 2 pages which I do not want, how can I prevent this?
I found this http://shaunakelly.com/word/styles/page-breaks-in-tables.html
But it does not seem to apply for C#.
I could not find a solution.
It seems that Novacode does not allow page break within cells (I think),
Or at least it is not clear to me how it is done.
My solution was, that instead of having one long table I made many tables,
and using table.keepWithinNext() made my tables page breaking.
Using keepWithinNext() on my cells skewed the document or made errors.

Data Table and Layout combination, CSS or tables?

I am implementing a schedule application that displays activities as rows and time shifts as columns. It allows users to group activities and days, spanning rows and columns. I posted a mock up at http://www.volunteeryourself.com/sch.htm. Would you do this data table/layout as a CSS or table? I can make either one work, just not sure which is better.
Given some of the features and the need to allow the user to add/manipulate items, I think CSS would work best.
Sorry if this is not the type of question to post here.
I'll say what I said earlier, If you are trying to achieve the image above the tables with the table content then DIV's and CSS will be less hassle.
If you are laying out pure tabular data then use tables, but tables are normally harder to style and get positioning etc right with.
it's tabular data, therefore you should use tables.
CSS can be used for this, (or I should say, a combination of divs/spans etc), but you would be creating unnecessary work for yourself.
By all means use CSS to style the table, but the bulk of the layout should be done using semantic table markup.

asp.net placeholders side by side

I have a webpage in asp.net that I am trying to lay out and I have a couple of placeholders that get filled with datagridviews full of information from a database.
This is simple enough to do with 2 placeholders and then then tables appear one above the other. What I would like to do is figure out how to do this so that the tables will end up appearing side by side.
I would prefer to keep the placeholder based design of the page so that if the tables from the database end up being different sizes, this doesn't break anything on the webpage.
Thanks for any help that you can provide.
Maybe I'm missing something, but I don't see why you wouldn't just use a 2-column CSS layout, and put one placeholder in the left column, and the other in the right column.
If you're not familiar with CSS, search for 2 column CSS layout in Google.

Resources