My problem is that the form is not responsive in mobile devices.
I don’t want to use JS or any frameworks and libraries, and I know my code is not so clean right now.
I’d be happy if you say any recommendation to make it better and solve the main issue.
Can’t you just lower the max-width a bit? I don’t think supporting anything below 360px is really all that relevant.
I get what you are doing with the radio buttons and it’s a fun idea, I’m just not sure about the accessibility of it.
I’m not sure the way the table is structured is correct for screen readers, although I must admit I haven’t really looked into it much. I think the left column should have th elements and you might have to use the scope attribute. Not even sure if using a table like this for a form can be made correctly accessible.
Thanks for your response,
For max-width, I did it but nothing has changed. Actually I know the table is primitive and at the beginning I thought the problem could be the table, so I commented it but the issue is still here.
Did you try just lowering the max-width on the #boxcontainer element? Something like 360px.
I’m not saying it’s primitive, nor am I talking about the responsiveness. I’m saying it might cause issues for people with screen readers that need the page to be accessible to use it.
I know it is not related to the post I don’t know if it is ok if I post this, but I have a question
A lot of people in India use a phone called JIO PHONE 2.
It is 320 pixels wide and 240 pixels tall.
It is tiny but has a browser and you can use youtube on it.
Should I let there be a horizontal scrollbar or write code for that size?
Hey awesome website!!
Add a max-width on the textareas(and also on the inputs IF YOU WANT TO, so that they can’t overflow their container and the user can’t drag the textarea beyond the container.
Definitely some accessibility issues with those radio buttons in the table. None of them have accessible names. They should probably be in a fieldset/legend. Nothing against trying something new but there is a reason that best practices and established patterns should be followed for the most part.
I think you can still make this look like a table layout if you want but not use an actual <table> for the HTML.
thanks for your help.
I do some changes with max -width and padding of table so my responsivity of form has been solved, but I don’t understand what is the accessibility issue?? could you explain please?
For starters, id’s must be unique on the page. You are using the same id for all the “leaders” radio buttons, and all the “tents” radio buttons, etc… Second, your <label>s don’t have any text in them so they aren’t doing anything. Third, radio button groupings like this should really use a fieldset/legend markup. If you don’t want to do this then the <label> for each radio button is going to need to be a lot more descriptive.
If you have never used a screen reader then I understand that you might not be familiar with all of these issues. That’s why it is always a good idea to follow best practices.
Another issue I didn’t even mention. You have turned down the font size to 85% in order to make the text fit in the table. That is not a good idea. A lot of people won’t be able to read it at that size and will need to manually crank up the font size. If I do that and then start narrowing the browser the table breaks out of its container.