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

How to directly link a pdf in the sidebar menu. #121

Open
hoffmanjs opened this issue Oct 18, 2024 · 6 comments
Open

How to directly link a pdf in the sidebar menu. #121

hoffmanjs opened this issue Oct 18, 2024 · 6 comments
Assignees

Comments

@hoffmanjs
Copy link

I am trying to directly link a pdf in the sidebar menu and I get an error. I have the pdf file in the public directory. It works to go directly to the pdf file via the URL.

I have the pdf linked under "Hourly Data"
image

The error I am getting when selecting "Hourly Data" from the sidebar menu.
image

When typing in the URL directly it works.
image

@willbreitkreutz
Copy link
Contributor

I think we need to add two tags to the Link object: target and one to ignore internal links(open in same tab). that will solve the issue in the sidebar, then when using a generic <a> tag developers will need to know to add either rel="external" as a prop or target="_blank" to open in new tab.

@willbreitkreutz willbreitkreutz self-assigned this Oct 21, 2024
@krowvin
Copy link
Contributor

krowvin commented Oct 24, 2024

@willbreitkreutz This has come up a few times in one form or another about linking to different tabs.

Some concern about 508 compliance and "_blank" that can be jarring for accessibility that @DanielTOsborne and others have brought up.

Might want to do something soon so users are not having to come up with their own solutions and won't have to go back later to add aria-label-by and alt to it, among other things.

@willbreitkreutz
Copy link
Contributor

@jbkolze is working on a Link tag that is related and could fix this issue or inform a solution. #30 I think

@willbreitkreutz
Copy link
Contributor

NOTE: this issue pertains to linking to static files (pdf etc...) from anywhere in the app, not just the sidebar

@willbreitkreutz
Copy link
Contributor

@jbkolze did this go anywhere or is it still something that needs addressed?

@jbkolze
Copy link
Contributor

jbkolze commented Dec 9, 2024

Still needs to be addressed. I need to do some testing between the Link component and the new sidebar stuff to make sure it works as expected, and then see if this particular issue can be addressed within the Link itself. Will try to make time for it this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants