OfficeDev/office-js

Impossible to reach/move focus back to Word add-in with keyboard navigation

Closed this issue · 7 comments

Provide required information needed to triage your issue

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Office on the web
  • Host [Excel, Word, PowerPoint, etc.]: Word
  • Office version number: latest Web version
  • Operating System: Sonoma 14.5
  • Browser (if using Office on the web): Google Chrome

Expected behavior

My Word add-in provided a button to select a Content Control in the Word document, and user will do some editing inside the content control. After finished editing, the expected behavior is the user should be able to use the keyboard to focus back to my Word add-in.

Current behavior

After editing the Content Control inside Word document, user is unable to switch focus back to the Word add-in.

Steps to reproduce

  1. You can use Script Lab to create some content controls inside Word document.
  2. Then try to move focus back to the TaskPane of Script Lab.
  3. The only thing we can do now is clicking the Add-in button on the ribbon again to switch focus back to the Word add-in. It means the Word add-in get re-opened (refreshed), which isn't what we wanted.
  4. What we wanted is move the focus back the the current opened Word add-in TaskPane.
  5. You can check the details in the screenshot video I attached below.

Provide additional details




Context

Useful logs

  • Console errors
  • Screenshots
Screen.Recording.2024-06-06.at.11.55.14.AM.mov
  • Test file (if only happens on a particular file)

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

Hi @monominia Thanks for reporting this issue. I try to use this example to repro your problem https://learn.microsoft.com/en-us/javascript/api/word/word.contentcontrol?view=word-js-preview#word-word-contentcontrol-onexited-member, but when I insert content control, when I focus on content control, I can click the button in taskpane. Could you provide more information? such as manifest? Thanks.

Hi @monominia Thanks for reporting this issue. I try to use this example to repro your problem https://learn.microsoft.com/en-us/javascript/api/word/word.contentcontrol?view=word-js-preview#word-word-contentcontrol-onexited-member, but when I insert content control, when I focus on content control, I can click the button in taskpane. Could you provide more information? such as manifest? Thanks.

Hey @shanshanzheng-dev , the problem is I am unable to use keyboard to focus on the taskpane after some editing inside the Content Control.
It's more of an accessibility problem. I know it's working to use the mouse.

Thanks @monominia. Sorry for my misunderstanding, I'm also unable use keyboard to focus back the taskpane. We'll be looking into this issue. we will report back here if we have a suggestion for you.

@monominia , thanks for reporting this. currently this functionality is not supported yet. If you have this need, we would like to suggest you go to https://techcommunity.microsoft.com/t5/microsoft-365-developer-platform/idb-p/Microsoft365DeveloperPlatform to ask a new question. Feature requests on it are considered when we go through our planning process.

Hey @xiruatms , thanks for your response, I'll create a request there.

This issue has been automatically marked as stale because it is marked as needing author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. Thank you for your interest in Office Add-ins!

This issue has been closed due to inactivity. Please comment if you still need assistance and we'll re-open the issue.