Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Excel: add a way to report cell size / content size #17422

Closed
Qchristensen opened this issue Nov 22, 2024 · 9 comments
Closed

Excel: add a way to report cell size / content size #17422

Qchristensen opened this issue Nov 22, 2024 · 9 comments
Labels
blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@Qchristensen
Copy link
Member

Is your feature request related to a problem? Please describe.

There are several (conceptually) related issues in Excel:

  1. NVDA reports when text is overflowing or cropped, but there is no way to tell whether it is just the edge of a letter which doesn't fit, or three paragraphs worth of text. It would be helpful to be able to find this out.

  2. When "Wrap text" is enabled (alt+h, w), text will not exceed the width of the cell but will flow onto new lines. While all the text will be visible, there is no easy way to tell how many lines this is taking up. In some cases wrapping text may result in a cell which is very narrow but ridiculously tall, taking up a lot of space but still not being readable - and again this isn't easy to find out.

Describe the solution you'd like

The best solution might depend on what is technically possible.

It is currently possible to find out the width of a column with alt+h, o, w. This is given in the default unit. For instance mine says the column I am looking at is 8.04. TBH, I have no idea what unit that is using or how wide it is, but if I can find out that is how wide the cell is and that my text is 11.3 wide, I would at least be able to work out that ok, I can wrap this text and it will fit on two rows. Or I can double the width of the column and it will fit.

Ideally it would be good to know how many lines of text are in a (wrapped) cell, but even if this could be given in points it could be helpful. I can see my row height is 14.4 (I really have no idea what unit this is using at that implies that my cells are nearly twice as high as they are wide, but I can assure you they are 3-4 times wider than they are high. Very odd. But even without knowing WHAT unit it is using, I can check the heigh of other rows to get an idea of how high one row is compared to others.

Describe alternatives you've considered

I'm open to anything which will give the user a way of determining how wide the text in a cell is, or how many rows a wrapped cell takes up. This information could possibly be conveyed with either NVDA+numpad delete or NVDA+tab.

Additional context

Windows 11 (64-bit) Version: 23H2, Build: 22631.4460
Office 365 (64-bit) Version: 16.0.18227.20046
NVDA 2024.4.1

@CyrilleB79
Copy link
Collaborator

You can still press F2 and then up/down arrows to count the number of lines in a cell.

Though, the most interesting would be some sort of notification when the row height is automatically increased due to text wrapping.

@seanbudd
Copy link
Member

@CyrilleB79 - when using F2, the bounds of the cell change temporarily, creating a different text flow pattern, so I'm not sure if this is a relevant work around

@Qchristensen - I think the workaround you describe by comparing different cell heights is the only feasible solution

@seanbudd
Copy link
Member

Closing as won't fix, the manual workaround described seems sufficient to solving the user story of determining height of row cells

@seanbudd seanbudd closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@Adriani90
Copy link
Collaborator

It would be nice though to have a keystroke in NVDA which reports the cell height and width on the fly. We have to open the menu and find the right cell formating button, then we have to open separately the dialog with information on height, and the other one with information about width.
Sighted people can see the cell height and width on the fly.
Given this could be improved in NVDA‘s Excel appmodule, I reopen.

@Adriani90 Adriani90 reopened this Nov 26, 2024
@CyrilleB79
Copy link
Collaborator

I do not find the solution proposed by @seanbudd completely satisfactory either.

The title of the issue is about cell height. But the ground issue described is about text too big to fit in a cell.

The realty of the problem is the following (at least for cells with "Wrap text" enabled:
As a blind user, I type text in my cell. I do not realize that the cell's width is not enough and I end up with a cell becoming always higher, e.g. 6 lines of text with 5 characters by line! I realize it much later and have to:

  • increase the width of the column
  • manually reduce the height of the row since the height can increase but not decrease automatically

In comparison, sighted people immediately realize if the cell is too high and can cancel the last action with control+Z.

To achieve something similar, I'd like to have a notification when the height of the row is increased. In addition of course, a handy way to have the cell's dimensions reported would be useful.

This way, I could:

  • Enter a too long text in the cell and validate
  • Be notified that the height of the current row has been increased automatically
  • Ask NVDA the dimension of the current cell
  • Copy the text, then press control+Z
  • Ask the dimension of the current cell with old content

Then there are two options:

  • Either I am satisfied with the new dimension; in this case I press control+Y to redo.
  • Or I am not satisfied with the new dimension. In this case:
    • I change the width of the column
    • I paste the text
    • And I perform the same steps/check than at the beginnng

This seems quite a lot of steps, but it's much less than without notification and using Excel's menus.

@Adriani90
Copy link
Collaborator

@CyrilleB79

I'd like to have a notification when the height of the row is increased.

Actually this happens quite imediately if you entered more than 10 letters or so and it happens continuously afterwards. The cells are very small by default. Not sure if an indication while the height is changing would help, because the width is also important and indeed it is possible to create an excel sheet where column width is changing automatically. This works with a VBA script and sighted people do this as well to avoid formating every cell manually.

My idea would be to have kind of an earcon, a sound which plays when I enter a cell with a different height and different width than the cell next to it. In that case I could imediately know, while navigating, that my currently focused cell doesn't have the same formating as the next one. I could retrieve the hight and width information by pressing a keystroke and could then proceed with the adjustment of the cell format.

An alternative would be to have reporting of height and width of cells as option in document formating settings of NVDA, this might be easier to implement.

@Adriani90
Copy link
Collaborator

Adriani90 commented Nov 26, 2024

@Qchristensen I think the problem you describe is quite delicate, because its solution is rather subjective. Some sighted people would make the cell wider, some others would make it taller. In both cases the text would fit visually into the cell.
Even if I knew there are three lines of text out of cell, I wouldn't really know how much I should increase the height or width in order for the text to match the cell exactly.

Microsoft should really provide a native keystroke in Excel to adjust both column height and width at the same time based on cell content automatically. Currently you can only adjust automatically the column width from the cell format menu. But if a column has a cell with much text, the whole column gets ridiculously wide.

@CyrilleB79
Copy link
Collaborator

@CyrilleB79

I'd like to have a notification when the height of the row is increased.

Actually this happens quite imediately if you entered more than 10 letters or so and it happens continuously afterwards. The cells are very small by default.

The cells are small by default. But in my use case, I have already re-dimensionned the cells to have something quite acceptable, i.e. where I think that the text I have to write should fit. Or someone else has already provided me an Excel document with acceptable sizes for the cells. But I want to be warned when my text goes out of the cell unexpectedly.

Not sure if an indication while the height is changing would help, because the width is also important and indeed it is possible to create an excel sheet where column width is changing automatically. This works with a VBA script and sighted people do this as well to avoid formating every cell manually.

A VBA script is not something I would call common or usable be many people. From what I know, if a cell's width is too small, say in column A, sighted people just double click with the mouse on the boundary between column headers A and B and the width of column A is automatically resized. It's very quick for a sighted person.

My idea would be to have kind of an earcon, a sound which plays when I enter a cell with a different height and different width than the cell next to it. In that case I could imediately know, while navigating, that my currently focused cell doesn't have the same formating as the next one. I could retrieve the hight and width information by pressing a keystroke and could then proceed with the adjustment of the cell format.

The problem with this approach is that you will not detect the change early; it depends on if you navigate again in the same zone afterwards. Moreover, you would detect the same way if your header row is 2 text row heigh (acceptable) or 15 text row high (not acceptable).

An alternative would be to have reporting of height and width of cells as option in document formating settings of NVDA, this might be easier to implement.

Quite inefficient IMO due to excessive verbosity.

Note: on contrary to what I wrote before, the height of the cell can reduce automatically if you delete the excessive amount of text.

@seanbudd seanbudd added p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation. blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. labels Dec 2, 2024
@SaschaCowley
Copy link
Member

Here are my thoughts:

  • We currently report overflowing and cropped cells in most situations, but we don't inform which direction the text is overflowing to or which sides are cropped.
    • Report "overflowing to the right" or "cropped to the right".
    • This may get a little messy, say for a cell with middle-aligned, centred text and filled cells to the left and top (so overflowing to the bottom and right, but cropped to the left and top). We would need to think carefully about how to communicate such situations efficiently.
    • We also have to make sure we respect the writing direction in the cell (an RTL script will overflow to the left by default, not to the right).
  • While it's potentially possible to discover poor text wrapping by editing the cell (Excel: add a way to report cell size / content size #17422 (comment)), this may not be accurate (Excel: add a way to report cell size / content size #17422 (comment)), and is inefficient.
    • If possible, we should let the user know if word breaks occur in the cell.
  • I also think having a keystroke to report the size of a cell is a nice-to-have, though this information is accessible by other means.
    • If added, it could be interesting to implement an approximate characters per line huristic, though this is likely to be difficult as it is highly dependant on script and typeface.

And results from some experimentation:

  • With UIA on:
    • Vertical overflow is reported, but vertical cropping is not
    • Overflow/cropping to the left is not reported.
  • With UIA off:
    • No reporting overflow for multiline cells
    • Centred and right aligned text reports as overflowing when it overflows
    • Text only reports as cropped if it's cropped by a cell to the right (so if it's cropped to the left it still reports as overflowing)

@nvaccess nvaccess locked and limited conversation to collaborators Dec 3, 2024
@SaschaCowley SaschaCowley converted this issue into discussion #17474 Dec 3, 2024
@github-actions github-actions bot added this to the 2025.1 milestone Dec 3, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
blocked/needs-product-decision A product decision needs to be made. Decisions about NVDA UX or supported use-cases. p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

5 participants