-
Notifications
You must be signed in to change notification settings - Fork 7
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
Landmarks in iframe not appearing in list #370
Comments
@matatk |
Thanks @moekraft. I've not considered this situation before; thanks for raising it :-). tl;drI can't address this immediately, but there are some avenues I am exploring. I hope to resolve it soon, but it won't be in the next release. There's a section about the multiple BackgroundThe duplicate I agree that it's a bug that Landmarks doesn't traverse into the Unfortunately, it's not easy to make this work in the context of a browser extension. I've done some quick checks, and the security model doesn't appear to provide access to the content of an For a while now, I've had the 'blue sky' thought that in the very long term, re-writing the scanning to be more tree-based and allow for different sub-parts of the document to be re-scanned when there are mutations could help with efficiency, and it could help here too. Though I have concentrated on making the existing approach as efficient as possible, and I think it's working well, and another even more extensive re-write is not something I can do right now. (Side note: I've been looking into functional programming properly at long last recently and I wonder, when the time does come, if using a language like Elm might help here.) However, there are steps in between where we are now and a re-architecting that I can explore; I'll see if I can at least make the code 'frame-aware' after the next release. (I was planning to make a new release quite soon, and this would be something I'd like to run in testing for a while before being sure about it.) Duplicate
|
From what I know about iframes there are some cases where it is impossible to to get their content from JavaScript (e.g. if the iframe comes from a different origin). I am not sure if it is worth the effort to add support for the few cases where it is possible. My approach would be to live with this limitation and document it. |
Good question. If JAWS cycles, maybe Landmarks should? Or, only go to first main with the "skip to main" command as long as the "next/previous landmark" command cycles through multiple mains. |
Thanks for your input @xi. It does seem like this would be a lot of work, even if there's a guaranteed way to get the frames' content. I’m not sure how many pages in the wild would both use The browser can inject the content script into frames—in my local tests this has worked well, but I'm not sure how it handles different origins—but the code would require re-working to fit into that environment. I found the However, I might be able to do pretty quickly is at least include the landmarks from other frames in the GUIs, separately from the landmarks for the main page—then at least they’d be in there. If I do that, and use it, maybe we will get a sense of how often this comes up. I was going to ask if you think we should have a test case for this in the test suite, but I think it's best that we consider it out of scope there. (I did some local trials (with things like having the |
Sounds like a good first step to me. :) |
@matatk Thanks Matt! |
@carmacleod Thanks Carolyn! |
And discovered that multiple mains are allowed as long as they have unique ids. : ) Glad that you are looking to support landmarks inside the iframe. |
Hi @moekraft. I have recently released version 2.8.0 of the extension; it does not feature any changes relating to iframes. However I've also just revived the unlisted test variant of the extension and sent a new version for review by the Chrome team. It's no longer as easy to upload a test version for Firefox, but I'm looking into how that might work, as when there are lots of landmarks on the page, it's nice being able to use the sidebar. Anyway, the upcoming test version...
Whilst we await the review, I wanted to ask: will a test version in Chrome work for you, or do you need a version for Firefox, Edge or Opera specifically? |
The test version of the extension is now available for Chrome—please try it out when you're able and let me know what you think. Now it's up there I should be able to make updates quicker. (One thing that just occurred to me is having a different icon for the test version might be helpful :-).) |
@matak Will check out the test extension. Thanks much! I finally got an update through in our iframe with an aria-label to distinguish it from the containing infrastructure. Will test with your test version in Chrome. |
is this still being explored ? |
Hi @gaurav5430. I haven't (yet) integrated this code into the extension, because the performance overhead would be great, and I haven't encountered any other situations in which scanning Also of note: I haven't come across any public pages that have a landmark structure across multiple I have been working on some potentially significant performance improvements over the past several months (details in a comment on PR #476), and am close to being able to test them. If those performance improvements are very significant, it might be feasible to at least add |
Sure, that's alright and makes sense in my usage, i was trying to test this inside storybook, which by default renders the UI in an iframe. i guess i would need to find a storybook specific addon for this Thanks a lot. |
That's interesting, @gaurav5430. I too have used StoryBook. I suspect with StoryBook there would not be many Another aspect of this is that it's really non-trivial for the code to work out where in the document each Something else that just occurred to me: maybe the extension could simply ignore Current priorities for features are: moving to a tree-based structure to improve performance; moving to Google's Manifest V3 API (or the extension will stop working); and looking again at adding headings. I will keep thinking about this, though. One suggestion for you: you might be able to use the browser's "open frame in new tab" feature to get around this problem for StoryBook—if it works, the frame you're interested in would be at the top level of the page, and Landmarks would be able to scan it. |
Hi @matatk,
Happy to see you keep this plugin alive!
I have an application that runs inside of an iframe. When I test the standalone iframe in my dev environment, all of the landmarks in the iframe appear in the Landmarks list and are highlighted on the page.
If access the page in our production environment, I only see the landmarks outside of the iframe down to the main landmark which is defined by the containing application.
I tested the production environment with JAWS and see all of the Landmarks including those from the parent application and those inside of the iframe. I am wondering if this is a limitation to the Landmarks plugin or a known issue.
The text was updated successfully, but these errors were encountered: