A militant group has claimed responsibility for an attack on tourists in the disputed Kashmir region that killed 26 people and injured 17.