Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility: change table layout in toolbar #8587

Merged

Conversation

Darshan-upadhyay1110
Copy link
Contributor

Change table layout to CSS base table structure

  • For the editor in the home view, a layout table is used, and it includes the use of IDs. This can
    potentially lead to issues with the interpretation of content by assistive technologies
  • Layout tables are
    meant to structure the layout of a page and should not contain structural markup like th , caption ,
    summary , headers , or id.

Solution:

  • replace td and 'table' tag with div
  • make some changes on css to be consistent with our previous design

Adjust table elements for mobile view

  • we changed table structure of toolbar-wrapper with div
  • so we also need to consider mobile view
  • made some necessary changes for mobile view because of structure change in cool.html.m4 ('toolbar-wrapper'

@Darshan-upadhyay1110 Darshan-upadhyay1110 changed the title Accesschange table layout in toolbar Accessibility: change table layout in toolbar Mar 20, 2024
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch 3 times, most recently from 6e3e9bc to 5842fa0 Compare March 21, 2024 06:37
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from 5842fa0 to 317be6a Compare March 21, 2024 07:33
Copy link
Contributor

@eszkadev eszkadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code is ok, waiting for Pedro wrt CSS

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from 317be6a to 896d474 Compare March 21, 2024 10:44
@eszkadev
Copy link
Contributor

I canceled cypress, I will retrigger build after my fix for cypress will be merged.

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch 2 times, most recently from d7668b7 to d1a6c6f Compare March 23, 2024 06:58
@eszkadev eszkadev force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from d1a6c6f to 69c6a4b Compare March 25, 2024 06:15
@eszkadev
Copy link
Contributor

rebased so it will include toolbar reworks

Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Desktop: all good
Mobile:

  • the back button and hamburger are misaligned -> fixed pushed another commit
  • Calc on mobile is broken: formula bar is inaccessible: I have pushed (last commit [WIP]) that fixes almost all issues, please feel free to re-use it and fix the last cosmetic issue

@pedropintosilva
Copy link
Contributor

Desktop: all good Mobile:

* the back button and hamburger are misaligned -> fixed pushed another commit

* Calc on mobile is broken: formula bar is inaccessible: I have pushed (last commit [WIP]) that fixes almost all issues, please feel free to re-use it and fix the last cosmetic issue

Tested on real android device with nc with chrome and chrome remote debug tools

@Darshan-upadhyay1110
Copy link
Contributor Author

Desktop: all good Mobile:

  • the back button and hamburger are misaligned -> fixed pushed another commit
  • Calc on mobile is broken: formula bar is inaccessible: I have pushed (last commit [WIP]) that fixes almost all issues, please feel free to re-use it and fix the last cosmetic issue

I have made some changes by adding a wrapper with CSS.

I have tested all apps in desktop + mobile. All Good

CC: @pedropintosilva

@eszkadev
Copy link
Contributor

Please rebase on top of recent w2ui rework to be sure it still works.

@Darshan-upadhyay1110
Copy link
Contributor Author

Darshan-upadhyay1110 commented Apr 1, 2024

Please rebase on top of recent w2ui rework to be sure it still works.

Things are now broken after w2ui rework :( . I will try to fix it

CC: @pedropintosilva please do not review it now i will post comment after fixes thanks

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from 019a17e to 1bac95b Compare April 1, 2024 05:47
@Darshan-upadhyay1110
Copy link
Contributor Author

Please rebase on top of recent w2ui rework to be sure it still works.

Things are now broken after w2ui rework :( . I will try to fix it

CC: @pedropintosilva please do not review it now i will post comment after fixes thanks

It seems a normal fix. There is fix height for toolbar-up, which is not good. Tested with mobile view and desktop all looks OK

CC: @pedropintosilva ready to review

@eszkadev
Copy link
Contributor

eszkadev commented Apr 1, 2024

@Darshan-upadhyay1110 there are incoming mobile toolbar conversions, best to not touch mobile yet
After we will remove w2ui then we can do it on clean structure

eg PR: #8673

@Darshan-upadhyay1110
Copy link
Contributor Author

@Darshan-upadhyay1110 there are incoming mobile toolbar conversions, best to not touch mobile yet After we will remove w2ui then we can do it on clean structure

eg PR: #8673

Sure, maybe i will wait till this PR merge then will proceed to change table thing

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch 3 times, most recently from bc1064a to 4da6cf6 Compare April 3, 2024 05:36
@eszkadev
Copy link
Contributor

eszkadev commented Apr 4, 2024

Please rebase on top of recent w2ui rework to be sure it still works.

Note:

cypress_test/integration_tests/desktop/writer/scrolling_spec.js seems to be a strange test case. as a locally i tried the same document which is used in this document and followed the same steps.

I can see in status bar there is a possibility to get "Page 1 and 2 of 4" it can not be always a specific string like "Page 1 of 4" or "Page 2 of 4" it can "Page 2 and 3 of 4"

This is a real case that I tried.

For me it happened when I changed size of toolbars (height), then view was different and it reported different state fro "currently visible pages"

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch 2 times, most recently from b7c6380 to e875759 Compare April 5, 2024 11:50
@Darshan-upadhyay1110
Copy link
Contributor Author

Please rebase on top of recent w2ui rework to be sure it still works.

Note:
cypress_test/integration_tests/desktop/writer/scrolling_spec.js seems to be a strange test case. as a locally i tried the same document which is used in this document and followed the same steps.
I can see in status bar there is a possibility to get "Page 1 and 2 of 4" it can not be always a specific string like "Page 1 of 4" or "Page 2 of 4" it can "Page 2 and 3 of 4"
This is a real case that I tried.

For me it happened when I changed size of toolbars (height), then view was different and it reported different state fro "currently visible pages"
Rebased
No change, still that case is failed.

@eszkadev
Copy link
Contributor

eszkadev commented Apr 5, 2024

Are you sure you didn't change any toolbar size? even 1 px, please check canvas size used in that test

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from e875759 to 105a9c4 Compare April 10, 2024 10:11
@eszkadev eszkadev closed this Apr 26, 2024
@eszkadev eszkadev reopened this Apr 26, 2024
@eszkadev
Copy link
Contributor

Unit Tests and Cypress Tests against core co-24.04 — FAILURE is old entry with all-in-one cypress - ignore

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch 2 times, most recently from 22b9f79 to 9991d09 Compare April 29, 2024 16:42
Copy link
Contributor

@eszkadev eszkadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one commit has name: WIP Please Darshan take this: Calc: Mobile: top toolbar and formula could you rename it or squash with other?
So it will not look like mistake.

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from 9991d09 to 14a82c6 Compare April 29, 2024 17:13
@Darshan-upadhyay1110
Copy link
Contributor Author

Darshan-upadhyay1110 commented Apr 29, 2024

one commit has name: WIP Please Darshan take this: Calc: Mobile: top toolbar and formula could you rename it or squash with other?
So it will not look like mistake.

Done

Copy link
Contributor

@eszkadev eszkadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, then I will leave final decision for @pedropintosilva as it is mainly css change

@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from 14a82c6 to a8e4b49 Compare April 29, 2024 17:37
@Darshan-upadhyay1110
Copy link
Contributor Author

Tested mobile test case all are passing in local build.
image

Darshan-upadhyay1110 and others added 5 commits April 30, 2024 12:46
- For the editor in the home view, a layout table is used, and it includes the use of IDs. This can
potentially lead to issues with the interpretation of content by assistive technologies
- Layout tables are
meant to structure the layout of a page and should not contain structural markup like th , caption ,
summary , headers , or id.

Solution:
- replace `td` and 'table' tag with `div`
- make some changes on css to be consistent with our prev design
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I136cd8d51b2e5035c6ef4292f759f49519e5bd61
- we changed table structure of `toolbar-wrapper` with `div`
- so we also need to consider mobile view
- made some neccessary changes for mobileview because of structure change in cool.html.m4 ('toolbar-wrapper')
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I91cd2c3ffbb0d625a78852398f6773136e9a7f6b
No need to specifically set width and height for .menuwizard-opened
state. Best to set only one time those dimensions and just inherit
from #toolbar-hamburger no matter the additional css class

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I51eafc6c9b05b843d800b40a990aefd912e463f8
With "Change table layout to CSS base table structure" and "Adjust
table elements for mobile view." changes we now have more divs instead
of table elements but with that the hamburger menu is now mislaigned
   - Fix height
   - To do: ideally we would make both hamburger menu and the button
   at its side rendered with the exact same structure which is not the
   case. And ultimately remove height and just have it flex stretch etc

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id9365df82f1caff132dde41760a06689ec1145d1
Pedro :
This changes from flex to grid (so we can have multiple columns and 2 rows)

Darshan:
    - adding one more div and wrap all child of toolbar-wrapper execpt 'formulabr' will work here
    - i have tested the css grid approch it is breaking the mobile UI in Calc
    - here i have changed a bit in html and twiked css which covers all cases

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia50fda95e2bef57d707bb4be1dd34e2ec083bfc5
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from a8e4b49 to 20ddde4 Compare April 30, 2024 07:16
To make consistent all toolbar element height with prev version where we were using w2Ui lib
- i have added height to table-row element same as we had in prev version
- remove fix height for toolbar-up which is not needed now
- this fix height will effect the bg-color in toolbar-up section

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I7b307a6a72968ed81fe2eb8663c430f11e3b3ced
@Darshan-upadhyay1110 Darshan-upadhyay1110 force-pushed the accessibility/darshan/change-table-layout-in-toolbar branch from 20ddde4 to e96e22d Compare April 30, 2024 09:49
Copy link
Contributor

@pedropintosilva pedropintosilva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, there are still other things that need fix/improvement but lets get this merged and I will send another PR and ask your testing @Darshan-upadhyay1110

@Darshan-upadhyay1110
Copy link
Contributor Author

still other things that need fix/improvement but lets get this merged and I will send another PR and ask your testing @Darshan-upadhyay1110

Thanks :)

Comment on lines +210 to +214
<div id="toolbar-hamburger">
<label class="main-menu-btn" for="main-menu-state">
<span class="main-menu-btn-icon" id="main-menu-btn-icon"></span>
</label>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As another follow up we should probably simplify this to have just a simple button with icon

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please prepare only after my PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@pedropintosilva pedropintosilva merged commit e88d934 into master May 2, 2024
14 checks passed
@pedropintosilva pedropintosilva deleted the accessibility/darshan/change-table-layout-in-toolbar branch May 2, 2024 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants