CBHSQ / findtreatment

FindTreatment.gov, An 18F+SAMHSA Collaboration
https://findtreatment.gov/
Other
19 stars 12 forks source link

Make outbound links open in a new tab. #494

Closed bpdesigns closed 5 years ago

bpdesigns commented 5 years ago

Current State

Desired State (updated)

Reason

bpdesigns commented 5 years ago

@allisonnorman @Jkrzy I think this should be a easy switch that will improve the experience for people

bpdesigns commented 5 years ago

I'd also make the header links open in a new tab

bpdesigns commented 5 years ago

Annnnnd any links in the content pages that go to a new site_ they should also open in a new tab for the same reason stated above. (Note: links to internal site content should always open in the same window and not a new one.

The only place I'm seeing this in a quick scan is:

@amandacostello if there are other links to outside resources from the content pages.

allisonnorman commented 5 years ago

I am pretty sure we made a decision earlier on to not open up new tabs for any external links, as it makes a choice on behalf of the visitor and standard practices are to not do that. I could see making an exception for the feedback form but otherwise, I think we should be consistent with what we decided before, unless we have a reason not to follow that standard.

bpdesigns commented 5 years ago

Agreed. The reason I wrote the comment is that searches are lost if you exit the site then reenter it from the back button. I think will disruptive for people. I'm not sure if this was always the case with the site. If it is, I'm sorry I overlooked it til now :(

allisonnorman commented 5 years ago

No need to be sorry! I'm just weary of making changes, even small ones, given how close we are to launching.

@davemcorwin - Just curious. Is there a way to universally change this for external links or would it be manual? What do you think about this?

davemcorwin commented 5 years ago

Right now we are opening the Google map links in a new tab, but I think that's it. As @allisonnorman mentioned, if the user navigates away from the site we lose the search even if they hit the back button since the data is only stored in memory.

@allisonnorman I can make a change to be able to make a universal change :) That is, I can change the component we are using for all external links so it would be the default behavior as opposed to adding target="_blank" everywhere...

Alternatively, we can make enhancements to enable the search to be retained via the "back" button for users who navigate away.

The latter is definitely more work and potentially more risky but doable in the timeframe that we have.

bpdesigns commented 5 years ago

Totally understand not wanting to change anything too much at this state @allisonnorman :)

I think this could wait til after launch but would want to prioritize it as high after that.

Two links I would manually change to open in a new tab now if there is time are:

  1. The link to the feedback form at the top of each page
  2. The link to the "Mental Health and Addiction Insurance Help" tool. Since paying for treatment is a large factor for people, I'd imagine people would want this open as they in the middle of their search
allisonnorman commented 5 years ago

Universally changing the external links to target = blank seems to be the easiest option and I'm fine with that, especially if you think reduces barriers for the audience, @bpdesigns.

@davemcorwin - I know you have a lot going on with documentation, but do you think this is feasible in the next couple days? I think we should just make the change in prod rather than making it on the launch prep branch.

davemcorwin commented 5 years ago

Both options:

  1. changing the 2 links that @bpdesigns suggested
  2. universally changing all of them

are low-lift and low-risk, and can be done today.

allisonnorman commented 5 years ago

Great. Let's go with option 2. I updated the issue for this.